Companies selling shampoo, food and other products wrapped in plastic have a decade to cut down on their use of the polluting material if they want their wares on California store shelves.

Major legislation passed and signed by Gov. Gavin Newsom on Thursday aims to significantly reduce single-use plastic packaging in the state and drastically boost recycling rates for what remains. It sets the nation’s most stringent requirements for the use of plastic packaging, with lawmakers saying they hope it sets a precedent for other states to follow.

“We’re ruining the planet and we’ve got to change it,” Sen. Bob Hertzberg, a Democrat, said before voting on the bill.

Under the bill, plastic producers would have to reduce plastics in single-use products 10% by 2027, increasing to 25% by 2032. That reduction in plastic packaging can be met through a combination of reducing package sizing, switching to a different material or making the product easily reusable or refillable. Also, by 2032, plastic would have to be recycled at a rate of 65%, a massive jump from today’s rates. It wouldn’t apply to plastic beverage bottles, which have their own recycling rules.

Efforts to limit plastic packaging have failed in the Legislature for years, but the threat of a similar ballot measure going before voters in November prompted business groups to come to the negotiating table.

The measure’s three main backers withdrew it from the ballot after the bill passed, though they expressed concern the plastics industry will try to weaken the requirements.

States have passed bans on single-use plastic grocery bags, straws and other items, and plastic water bottles soon won’t be allowed in national parks. But the material is still ubiquitous, used in everything from laundry detergent and soap bottles to packaging for vegetables and lunch meats. Most plastic products in the United States are not recycled, with millions of tons ending up in landfills and the world’s oceans. It harms wildlife and shows up in drinking water in the form of microplastics.

Marine animals that live off the Pacific coast from crabs to whales are ingesting plastics that make their way into the ocean, said Amy Wolfrum, California ocean policy senior manager at the Monterey Bay Aquarium. She called the bill a “fantastic start” to addressing a major problem.

Plastic makers would form their own industry group tasked with developing a plan to meet the requirements, which would need approval from the state’s recycling department. They’ll be required to collect $500 million annually from producers for a fund aimed at cleaning up plastic pollution. Maine, Oregon and Colorado have similar producer responsibility systems.

It does not ban Styrofoam food packaging but would require it to be recycled at a rate of 30% by 2028, which some supporters said is a de facto ban because the material can’t be recycled. The ballot measure would have banned the material outright. It would have given more power to the state recycling agency to implement the rules rather than letting industry organize itself.

Sen. Ben Allen, a Santa Monica Democrat who led negotiations on the bill, said it represented an example of two groups that are often at odds — environmentalists and industry — coming together to make positive change.

He called it a “strong, meaningful compromise that will put California at the forefront of addressing a major global problem.”

Though they withdrew their ballot initiative, the measure’s proponents said they remain concerned that industry will try to water down the bill. The initiative’s three backers were Linda Escalante of the Natural Resources Defense Council; Michael Sangiacomo, former head of the waste management company Recology; and Caryl Hart, a member of the California Coastal Commission.

Joshua Baca of the American Chemistry Council, which represents the plastics industry, said the bill unfairly caps the amount of post-consumer recycled plastic that can be used to meet the 25% reduction requirement and limits “new, innovative recycling technologies.”

The bill bans incineration and combustion of plastic but leaves open the possibility for some forms of so-called chemical recycling.

Judith Enck, president of Beyond Plastics, said while California’s bill goes further than any other state when it comes to reducing plastic pollution, it still falls short. She said it will only result in about a 10% reduction in overall packaging because producers can make products refillable or switch to other materials. She also said that it relies too heavily on failed plastics recycling policies.

Plastic production is supposed to triple globally by 2050, she said.