Philadelphia and three other Pennsylvania municipalities sued the state on Wednesday over a law that blocks them from enacting or enforcing bans on plastic bags.

Republican state lawmakers added a provision to a budget bill last May that prevents municipalities from banning bags or other single-use plastics, such as straws, until at least this July.

But Philadelphia is planning to implement its ban anyway. And the city, along with West Chester, Narberth, and Lower Merion, said in the lawsuit that the measure was unconstitutionally slipped into the state budget.

The state prohibits laws regulating single-use plastics until July or six months after Gov. Tom Wolf lifts his coronavirus state of emergency order, whichever comes later. Wolf hasn’t yet lifted that order.

But despite the state law, Philadelphia is planning to move forward with implementation of its ban on plastic bags beginning July 1. City Council passed the law in 2019 after years of failed efforts to regulate plastic bag use, and the implementation date has twice been delayed due to the pandemic. Officials said the lawsuit filed Wednesday would confirm that the city has the right to enforce its law.

“This preemption provision is both undemocratic and unconstitutional, and directly harms Philadelphia,” City Solicitor Diana Cortes said.

Narberth enacted an ordinance with a 10-cent fee for plastic bags in April 2019. West Chester passed a ban in 2019, but its implementation was also delayed. In Lower Merion, the lawsuit said, officials want to introduce a ban.

While Philadelphia plans to implement its ban in July, the lawsuit seeks to have the state law struck down to prevent any challenges once implementation begins.

The city will have a grace period for businesses before beginning enforcement in October, Deputy Commerce Director Karen Lockhart Fegely said.

“Businesses are still encouraged to begin phasing out their plastic bag supply while still possible,” she said. “We’re telling them to use up what they’ve got.”

The petition filed Wednesday in Commonwealth Court challenges the state prohibition on procedural grounds. State lawmakers added the measure to an unrelated budget bill on the day it was approved, the municipalities said, violating a law that requires legislation to only cover a single subject.

“The way it was done is what the concerning point is for us here,” said City Councilmember Mark Squilla, who sponsored the Philadelphia bag ban.

The petition also said the law violates the environmental rights amendment to the state constitution, which prevents the state from acting against “protected environmental interests.”

The lawsuit was filed against Pennsylvania and the state legislature. A spokesperson for state Attorney General Josh Shapiro, a Democrat who would be responsible for defending the state, said his office will evaluate the lawsuit’s claims.

Jenn Kocher, a spokesperson for Senate President Jake Corman, the Republican leader, said his office would review the lawsuit. She also defended prohibiting plastic bag bans, saying that studies commissioned by state lawmakers showed that the bans hurt the economy.

“Senator Corman has always said that the desire of local municipalities to ban the use of single-use plastic bags cannot be made in a vacuum,” Kocher said. “The employers that manufacture these bags provide family-sustaining jobs in communities throughout Pennsylvania.”