SACRAMENTO (AP) — The California state Senate has approved a new fee on real estate transactions to help generate hundreds of millions of dollars for affordable housing.

The legislation passed Thursday would impose a $75 fee on documents such as deeds and notices, with a cap of $225 per transaction. The bill now heads to the Assembly.

READ MORE: Rising Sea Level Threatens Stinson Beach Neighborhoods

California is facing an affordable housing crunch, prompting lawmakers to look for ways to spur building of more low-cost housing. The fee is expected to generate between $200 and $300 million annually for affordable housing projects.

READ MORE: Kaiser Employees Win $11.5 Million Class-Action, Race-Discrimination Lawsuit

Republican opponents say it would hurt middle class people trying to buy homes. They suggest the Legislature should instead roll back regulations on housing construction.

Democrats say addressing the housing crisis will require a combination of solutions.

MORE NEWS: Bay Area Teams Ready to Welcome Fans But Impact of Fake Vaccination Cards Is Unknown

© Copyright 2017 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.