Californians who can’t pay rent because of the coronavirus could stay in their homes through at least Jan. 31, but only if they pay a portion of some missed payments under a proposal endorsed Friday by Gov. Gavin Newsom and state legislative leaders.

The California court system has halted most eviction and foreclosure proceedings since April 6 because of the pandemic. But those protections will expire on Tuesday, prompting fears of a wave of evictions in a state that already has the largest homeless population in the country.

Lawmakers have been rushing to come up with a bill to extend those eviction protections while balancing the impact on landlords, many of whom depend on rent payments to pay their mortgages.

The proposal Newsom announced Friday would ban evictions for unpaid rent because of the coronavirus for money owed between March 1 and Aug. 31. From Sept. 1 through Jan. 31, tenants must pay at least 25% of their cumulatively owed rent. If they don’t, they can be evicted.

Tenants would still owe the money. Landlords could sue them to get the money back, and a judge could order them to pay it. But tenants could not be evicted.

Tenants would have to sign a document, under penalty of perjury, that says they cannot pay their rent because of a coronavirus-related economic hardship. Higher-income renters — defined as people who make at least $130,000 a year or 13% of the area’s median income, whichever is larger — must provide proof that they cannot pay their rent because of the virus.

The bill does not protect landlords from foreclosures. But it would extend the California Homeowner Bill of Rights to small rental properties of up to four units. The Homeowner Bill of Rights provides some foreclosure protections, but right now it only applies to owner-occupied homes.

“Literally millions of people being evicted or at least subject to eviction substantially was mitigated because of this,” Newsom said.

The bill does not protect against all evictions. Evictions for reasons other than nonpayment of rent can resume on Sept. 2. That’s disappointing to some tenant advocacy groups, who had been pushing for broader eviction protections in a state that was facing a housing shortage prior to the pandemic.

Assemblyman David Chiu, a Democrat from San Francisco and the bill’s author, said the bill is weaker than he wanted because he had to get two-thirds of the Legislature to vote for it. That way, the bill would take effect immediately after Newsom signed it. Otherwise, the bill would have not taken effect until January, leaving a lengthy gap with no protections.

“What the governor is announcing today is an imperfect but necessary solution to a colossal problem,” Chiu said. “What’s being proposed will hopefully prevent and delay eviction of many tenants, but it pains me that this will not stop every eviction.”

Chiu called the bill a “temporary fix,” saying lawmakers will try again to pass longer-term protections when the Legislature returns in January.

The California Apartment Association, which represents owners, investors and developers, applauded the proposal. But they said a permanent solution must come from the federal government.

“COVID-impacted renters need financial assistance, from the feds, so they can pay their rent,” said Debra Carlton, the association’s executive director. “Otherwise, renters will be hard-pressed to pay the rent that’s accumulated, and housing providers will go out of business.”