As rents continue to skyrocket across the country, state and local governments (and renters themselves) are scrambling for solutions. One of the most obvious -- and most controversial -- of those is rent control, which caps rent increases in an effort to keep cities more affordable for low- and middle-income people.

Advocates have long touted the policy as a way to keep rents from growing exponentially, and support for it appears to be growing: At least three states -- California, Illinois and Washington -- have introduced legislation that would allow cities to enact more rent controls. Opponents, on the other hand, claim that rent control leads to dilapidated units, deferred maintenance and an overall reduction of the rental housing stock.

So who’s right? According to a new Stanford University study, both of them -- partially.

Researchers found that rent control does create substantial benefits for tenants who live in rent-controlled units -- but those benefits aren’t shared by society as a whole. In fact, the policy reduced the overall number of rental units on the market, thereby actually driving prices up and worsening the affordability crisis.

“We found that the decrease in supply [of rental units] leads to an overall rent increase. The losses [of rental units] are big and important and really undermine the fundamental goal of rent control,” says Rebecca Diamond, a co-author of the study and an assistant professor of economics at Stanford.

The report focused on San Francisco, where a 1994 ballot measure expanded rent control to certain smaller multifamily apartment buildings constructed before 1980. Because units built after 1980 were not included in the expansion, the result was what researchers call a “natural experiment” in which the newer units could act as a control group. The researchers then tracked tenants' housing as well as changes in the housing stock and rents.

Tenants in rent-controlled units benefitted dramatically from the policy. From 1995 to the present, they paid between $2,300 and $6,600 less than they would have if rent control wasn't in place. As a lump sum, their savings totaled about $2.9 billion. They were also between 10 and 20 percent more likely to stay at the same address than the control group.

But those benefits came at the cost of landlords, who didn’t take their diminished profits lying down. Many of them -- particularly in more expensive areas -- took their properties off the rental market and either moved in themselves, converted the units to condos or tore their buildings down to renovate. (That last strategy is a way to avoid the city's rent control rules since they don't apply to new construction.)

“This substitution toward owner-occupied and high-end new construction rental housing likely fueled the gentrification of San Francisco, as these types of properties cater to higher income individuals,” the study concludes.

Overall, the landlords studied in the report reduced their rental supply by 15 percent, which led to a 5 percent decrease in the city’s overall rental housing stock and a 5 percent increase in overall rent prices. What’s more, there was a 25 percent reduction in the number of renters living in rent-controlled units compared to 1994.

The study comes at a time when the housing crisis has reached confounding proportions, particularly in America’s largest cities.

According to Harvard University’s Joint Center for Housing Studies, median inflation-adjusted rents rose 15 percent between 2000 and 2016, reaching $980. At the same time, renter incomes declined from $38,000 to $37,300. Across the West Coast, the lack of affordable places to live is fueling a growing homelessness crisis. And the problem doesn’t show any real signs of abating. In fact, recent changes to the tax code could seriously erode what affordable housing stock there is left.

All of that has led to a renewed interest in rent control in some states, including California, where voters are gathering support for a ballot initiative that would repeal a ban on rent control for properties built after 1995.

To advocates of rent control, the Stanford study leaves out a crucial part of the picture: Why should it be legal for landlords to behave in ways that allow them to circumvent rent control laws? It was, after all, primarily landlords’ attempts to skirt the provision that resulted in a reduced housing supply and increased housing prices.

Larry Gross, executive director of the Los Angeles-based Coalition for Economic Survival, points to the Ellis Act in California, which allows landlords to mass-evict tenants in order to get out of the rental business.

The Coalition for Economic Survival and many other tenants’ groups in California argue that this law is abused to evict tenants in rent-controlled apartments and then quickly convert the units to luxury condos that don't have to abide by rent control rules. In 2017 alone, the Ellis Act was used to get rid of 1,824 rent-controlled units.

It's laws like the Ellis Act, Gross says, that need to be reformed -- not rent control provisions.

But Diamond, the co-author of the study, doesn't buy that argument: "Why are landlords the ones who have to subsidize tenants? Why do they have to bear that cost?"

Her study instead suggests that the costs of keeping housing affordable should be shared by society, through a tax credit or a government subsidy that protects low- and middle-income families against large rent increases.

"This," the Stanford paper concludes, "would remove landlords’ incentives to decrease the housing supply and could provide households with the insurance they desire."