In a move aimed at reducing huge amounts of plastic litter in the oceans, along roadways and other parts of the state, California Gov. Gavin Newsom has signed a first-in-the-nation law requiring plastic beverage containers to contain an increasing amount of recycled material.

Under the law, companies that produce everything from sports drinks to soda to bottled water must use 15% recycled plastic in their bottles by 2022, 25% recycled plastic by 2025, and 50% recycled plastic by 2030.

Supporters of the new law say it will help increase demand for recycled plastic, curb litter and reduce consumption of oil and gas, which are used to manufacture new plastics.

“This is the most ambitious, aggressive recycled plastics content law in the world,” said Mark Murray, executive director of Californians Against Waste, a Sacramento-based environmental group.

In California, roughly 12 billion plastic bottles are sold every year. Although about 70% are recycled, often into other types of plastic packaging, more than 3 billion bottles are not recycled at all, according to state statistics. Most of those are dumped in landfills or discarded as litter in the outdoors.

After China stopped accepting many waste plastics two years ago, there has been a glut.

“We are doing a really good job of collecting things for recycling,” Murray said. “The difficult part has been finding an end-use market for it. This new law is about closing the loop. Now companies that manufacture the plastic bottles have to buy them back. They’ll have the responsibility.”

Some industry groups opposed the bill when it was first introduced two years ago, helping kill it then. But with an increasing number of companies committed to making recycled bottles as scientists report more and more alarming facts about plastic pollution in the oceans, and European nations imposing similar rules, their opposition has largely melted away.

Rather than fighting the bill, the plastics industry, container manufacturers and retailers focused efforts on a more controversial plastics pollution bill this year. The bill would have required companies to reduce the waste generated from single-use packaging like utensils, plates, cups and straws in California 75% by 2030. That drop could come through recycling, composting or reduction in the amount of packaging.

That bill failed this year and last.

“The time has come for companies to step up and help us be good environmental stewards,” said Assembly Member Phil Ting, D-San Francisco, who co-wrote the plastic bottle bill. “By boosting the market for used plastics, fewer containers will end up as litter.”