State Sen. Toni Atkins, D-San Diego, snaps a photo as she and Sen. Steve Glazer, D-Orinda, right, watch as the votes are posted for her affordable housing bill, Thursday, July 6, 2017, in Sacramento, Calif. (AP Photo/Rich Pedroncelli) The Associated Press

The California state Senate approved a new fee Thursday on some real estate transaction documents to generate hundreds of millions of dollars for affordable housing.

The legislation would impose a $75 fee on documents such as deeds and notices, with a cap of $225 per transaction. It’s expected to generate between $200 and $300 million annually for affordable housing projects.

It passed 27-12 with all Democratic votes and now heads to the Assembly.

An estimated 1.5 million California families lack access to affordable housing, and lawmakers are pushing a series of bills aimed at addressing the problem. California also has disproportionately high homelessness rates.

“When you use this money to build more housing, you generate more income more tax, more jobs and it helps spur the economy,” said Sen. Toni Atkins, a San Diego Democrat who authored the bill. “This will make a difference for middle income families.”

Republican opponents disagreed, saying it would hurt middle class people.

“I want to solve that problem, but I can’t do it on the backs of the emerging people who have worked hard, trying to get their first house or move their family into a home that would accommodate their growing family,” said Sen. Joel Anderson, a Republican from Alpine.

The bill exempts documents related to sales of residential and commercial property, but would apply to other transactions such as refinancing a mortgage.

Several Republicans said the Legislature should roll back regulations on housing construction instead of passing Atkins’ bill. Democratic Gov. Jerry Brown has expressed similar concern about spending on subsidized housing before removing burdensome building restrictions.

Democrats argue that addressing the housing crisis will require a combination of measures that include funding for subsidized units and streamlining construction.

A number of housing bills are advancing through the Legislature, but none have passed both houses and secured Brown’s signature.

The Senate also passed a bill giving Marin County a pass from complying with certain housing density laws. The San Francisco Bay Area county is already exempt from some laws through 2023 and lawmakers voted to extend that through 2028.

Assemblyman Marc Levine, a Democrat from Marin County who requested the provision, said it designates the county as suburban rather than urban. He said affordable units will be easier to build if cities can plan for them to be part of suburban-style developments.

“By recognizing the suburban character of the county, you actually allow for more opportunity for housing to be built,” Levine said. He could not provide a number of housing units built but said the policy has been effective since it went into effect in 2014.

• The Associated Press