SACRAMENTO, Calif. (AP) — California will limit rent increases for some people over the next decade after Democratic Gov. Gavin Newsom signed a law Tuesday aimed at combating a housing crisis in the nation's most populous state.

Newsom signed the bill at an event in Oakland, an area where a recent report documented a 43% increase in homelessness over two years. Sudden rent increases are a contributing cause of the state's homeless problem, which has drawn national attention and the ire of Republican President Donald Trump.

"He wasn't wrong to highlight a vulnerability," Newsom said of Trump's criticisms to an audience of housing advocates in Oakland. "He's exploiting it. You're trying to solve it. That's the difference between you and the president of the United States."

The law limits rent increases to 5% each year plus inflation until Jan. 1, 2030. It bans landlords from evicting people for no reason, meaning they could not kick people out so they can raise the rent for a new tenant. And while the law doesn't take effect until Jan. 1, it would apply to rent increases on or after March 15, 2019, to prevent landlords from raising rents just before the caps go into place.

California and Oregon are now the only places that cap rent increases statewide. Oregon capped rents at 7% plus inflation earlier this year.

California's rent cap is noteworthy because of its scale. The state has 17 million renters, and more than half of them spend at least 30% of their income on rent, according to a legislative analysis of the proposal.

But California's new law has so many exceptions that it is estimated it will apply to 8 million of those 17 million renters, according to the office of Democratic Assemblyman David Chiu, who authored the bill Newsom signed.

It would not apply to housing built within the last 15 years, a provision advocates hope will encourage developers to build more in a state that desperately needs it. It does not apply to single family homes, except those owned by corporations or real estate investment trusts. It does not cover duplexes where the owner lives in one of the units.

Story continues

And it does not cover the 2 million people in California who already have rent control, which is a more restrictive set of limitations for landlords. Most of the state's largest cities, including Los Angeles, Oakland, and San Francisco, have some form of rent control. But a state law passed in 1995 bans any new rent control policies since that year.

Last year, voters rejected a statewide ballot initiative that would have expanded rent control statewide. For most places in California, landlords can raise rent at any time and or any reason if they give notice in advance.

That's what happened to Sasha Graham in 2014. She said her rent went up 150%. She found the money to pay it on time and in full, but her landlord evicted her anyway without giving a reason. She was homeless for the next three years, staying with friends, then friends of friends and then 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."

Graham, who is now board president for the Alliance of Californians for Community Empowerment, now lives in family housing at the University of California, Berkeley, where she is scheduled to graduate in May. She said the law, had it been in place, would have helped her.

But Russell Lowery, executive director of the California Rental Housing Association, says the law adds an expensive eviction process that did not previously exist. He said that will encourage landlords to increase rents when they otherwise wouldn't.

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