SACRAMENTO, Calif. -- California lawmakers have approved a measure that would make the state the first in the U.S. to impose a statewide ban on single-use plastic bags.

The bill cleared the Senate on a 22-15 vote Friday and was sent to Gov. Jerry Brown to sign. It was approved by the Assembly a day earlier.

Senators who had previously opposed the bill, this time supported the measure after protections were added for plastic bag manufacturers.

The bill by Democratic Sen. Alex Padilla of Los Angeles would prohibit single-use plastic bags at grocery stores and large pharmacies in 2015 and at convenience stores in 2016.

It includes $2 million in loans to help manufacturers shift to producing reusable bags and lets grocers charge 10 cents each for paper and reusable bags.

The bill had sparked one of the most contentious debates in the last weeks of the legislative session, with aggressive lobbying by environmentalists and bag manufacturers.

For years, a statewide plastic bag ban has been an elusive goal for lawmakers trying to reduce the buildup of plastic waste in oceans and waterways that costs millions of dollars to clean up. About 100 local jurisdictions in California already have adopted similar bans, including Los Angeles and San Francisco.