California residents now have a little more help against some of the highest rents in the country thanks to a bill signed into law by Gov. Gavin Newsom on Tuesday.

The new law limits the annual rent increases to 5% plus the rate of inflation, and it adds protections for tenants in an effort to keep landlords from evicting them without cause.

The law won’t apply to housing that received a certificate of occupancy in the previous 15 years, university or college dorms, or single-family, owner-occupied residences.

“Millions of California renters are just one rent increase or eviction away from experiencing homelessness,” Assemblymember David Chiu (D-San Francisco), who wrote the bill, said Tuesday. “Just because someone rents doesn’t make them any less worthy of having a stable home.”

There are more than 17.5 million renters in California, and just over half of them spend 30% or more of their income on rent, according to an analysis of rent control by the Haas Institute for a Fair and Inclusive Society at the University of California, Berkeley.

Newsom, a Democrat, said that the law includes some of the strongest rent controls in the U.S.

Newsom said that “one essential tool” to combat the homelessness crisis “is protecting renters from price-gouging and evictions.”

California is in the grips of a homelessness and housing crisis. The state has the second-highest poverty rate in the U.S. Meanwhile, California cities make up six of the top 10 most expensive cities in the country, according to Forbes.

In San Francisco, homelessness spiked 17% between 2017 and January 2019, with over 8,000 homeless people living in the city.

Los Angeles County has had a 12% increase in homelessness from 2018 to 2019, according to a survey. On any given night in January 2019, there were nearly 59,000 people without homes in Los Angeles County.

During the bill-signing ceremony, Newsom said that the law alone wouldn’t be enough to solve California’s housing crisis.

“We have to address the issue of production in the state of California,” Newsom said, according to The Wall Street Journal. “We need to build more damn housing.”