(Bloomberg Opinion) -- Even before the coronavirus pandemic, the U.S. rental market was in  trouble. In 2017, economist Andrew Dumont calculated that 46.8% of U.S. renter households spent more than 30% of their income on housing. Poorer households, unsurprisingly, were even more heavily burdened; in 2015, the lowest-income quintile spent more than half of their income on rent.

Then came the pandemic. Although federal relief managed to support many unemployed workers and distressed businesses, many people fell through the cracks, failing to qualify for special unemployment benefits or bailout funds. And many Americans who didn’t have formal jobs before the crisis are in danger of the loss of under-the-table income. Now tens of millions of these unlucky people say they’re unable to pay rent, and a tidal wave of evictions is looming. Meanwhile, some landlords may be using the chaos and confusion of coronavirus to evict tenants they had wanted to get rid of for a while.

Federal policy was supposed to prevent this. The Cares Act, the main federal relief bill, imposed a moratorium on evictions from federally subsidized apartments and in homes covered by federally backed mortgages. Many states and cities imposed eviction bans as well. But enforcement of these restrictions is often patchy. Stopping an eviction requires going to court, which is even more difficult in the age of Covid-19 because many courts have been closed. Many renters aren’t protected by any of the moratoriums, and even those who are don’t always realize it. Furthermore, a number of moratoriums could expire soon if they’re not renewed. The result could be a humanitarian disaster, with poor and Black households taking the brunt.

But a wave of evictions wouldn’t just be a humanitarian disaster; it would be an economic one as well. Kicking millions of people out of their homes would make the market less efficiently, for one simple reason: There aren't enough new tenants to take their place.

When a landlord evicts a tenant, they need someone else to move in relatively quickly. If no one does, it means a financial loss for the landlord and an economic loss for the country as a whole because the apartment is going to waste. The time and expense that the evicted tenant has to spend moving to a new place results in an additional economic loss.

This doesn’t mean eviction should be banned. In normal times, it’s not too hard to find someone new to move in -- a new resident from out of town, a young person moving out of their parents’ home and so on. Although often brutal for the evicted, this process at least contributes to reallocation in the rental market; higher-income people take the better units and lower-income people move to cheaper accommodations. Also, if eviction for nonpayment of rent were impossible, the rental market itself would collapse, as all rental properties turned into either owner-occupied condominiums or anarchic housing for squatters.

But when a big economic crisis is sweeping the country, the calculus changes. When many people lose their homes at once, there’s a much lower likelihood that landlords will be able to find new tenants to replace the people they evict. This is especially true because of the economic crisis -- business closures and the uncertainty of continued government benefits mean fewer economically healthy households to take the place of the distressed.

Units whose tenants are evicted will probably sit empty for many months until the crisis is past, while the evicted low-income people will either crowd in with family or become homeless, increasing the risk of coronavirus spread. This is bad from both an economic and a public-health standpoint.

Meanwhile, if landlords just let their tenants stay rent-free for a few months, and applied for federal funds to replace part of their lost income, the outcome would be much better. People could stay in their homes until they started making money again -- which many will, as soon as the threat of the virus is past. Many landlords probably don’t realize this, or are too optimistic about their ability to replace the lost tenants. So stronger, more widespread and longer-lasting eviction moratoriums would probably be good for the economy.

But because of the patchwork of state and local authority, and the difficulty of enforcing eviction bans in court, Congress should turn to another tool: rent assistance. Households with low income levels relative to their pre-pandemic rent payments should be able to get aid from the federal government to help pay rent through the end of the year.

Together, eviction moratoriums and rental assistance can keep the U.S. rental market from becoming even more of a disaster than it already is.

This column does not necessarily reflect the opinion of the editorial board or Bloomberg LP and its owners.

Noah Smith is a Bloomberg Opinion columnist. He was an assistant professor of finance at Stony Brook University, and he blogs at Noahpinion.

©2020 Bloomberg L.P.