Updated

California will limit how much landlords can increase rents over the next decade as the state continues to grapple with a housing crisis that has exacerbated its homelessness epidemic.

Democratic Gov. Gavin Newson signed the law Tuesday in Oakland, a city that has seen a 43 percent increase in homelessness in recent years. President Trump highlighted the issue last month, saying California cities continue to “destroy themselves” by not addresses the homeless crisis.

“We have people living in our … best highways, our best streets, our best entrances to buildings ... where people in those buildings pay tremendous taxes, where they went to those locations because of the prestige,” Trump told reporters.

SAN FRANCISCO'S MOST EXPENSIVE LISTING GETS $4.5-MILLION CUT FROM $45 MILLION ASKING PRICE

Speaking in Oakland to a crowd of housing advocates, Newsom said Trump "wasn’t wrong to highlight a vulnerability."

In June, the governor authorized $2.4 billion in spending to address the state's housing and homelessness crisis, including millions of dollars to build shelters. Affordable housing advocates have long urged lawmakers to make residential development easier to increase the state's housing stock.

The law signed by Newsom limits year-over-year rent increases to five percent plus inflation until Jan.1, 2030. Landlords are also barred from evicting tenants without just cause, a provision meant to curb evictions just to raise rents.

The law doesn't take effect until Jan. 1 but retroactively applies to rent increases on or after March 15 of this year to prevent landlords raising rents before the cap goes into effect.

Democratic Assemblyman David Chiu, who authored the bill, estimates the law will apply to 8 million of the state's 17 million renters. It would not apply to housing built within the last 15 years, single-family homes except those owned by corporations or real estate investment trusts, or those living in rent-controlled units. Duplexes where the owner lives in one of the units also are not affected by the new law.

LOS ANGELES OFFICIALS PRESSURING NEWSOM TO DECLARE STATE OF EMERGENCY AMID HOMELESS CRISIS

Russell Lowery, executive director of the California Rental Housing Association, said the law adds another layer of red tape to the eviction process.

“It adds unnecessary expenses to all rental home providers and makes it more difficult to sever a relationship with a problem tenant,” he said.

Housing advocates are hopeful the law will spur more development in a state that desperately needs it. Housing costs have become a major issue in California, as many residents continue to be priced out of desirable neighborhoods.

In Los Angeles County, the shortage of affordable homes and apartments has spurred people to move further away from the coast into the desert east of the city. In the San Francisco area, the median price for a home is around $1.5 million.

Last year, voters rejected a statewide rent control ballot measure. Los Angeles, San Francisco and Oakland already have some form of rent control, but a 1995 law bans new rent control policies.

Without rent control, landlords in most cities across the state can raise rents at will as long as they give advanced notice.

CLICK HERE TO GET THE FOX NEWS APP

Bay Area resident Sasha Graham told The Associated Press her rent went up 150 percent in 2014. She paid on time and in full but was evicted anyway. She was homeless for the next three years, drifting between the homes of friends and strangers.

"Sometimes I lived with no lights, sometimes I lived with no water, depending on who I was living with [because] they were also struggling,” she said. “Sometimes I just had to use my money to go to a hotel room so I could finish my homework.”

In June, officials in Los Angeles County announced that homelessness had jumped 12 percent over the past year despite $619 million in spending.

The Associated Press contributed to this report.