Enjoy your takeout while you can, New York.

New York City Mayor Bill de Blasio and his administration announced on Thursday that the city will ban polystyrene foam, effective July 1.

Polystyrene foam is used in products such as packing peanuts and containers for takeout food and drink.

Reuters reports that the ban fulfills a campaign promise made by de Blasio to ban the foam.

“These products cause real environmental harm and have no place in New York City,” de Blasio said in a statement.

Restaurants will be granted a six-month grace period to comply with the ban, after which they will be fined if they fail to incorporate environmentally friendly alternatives. Restaurants making less than $500,000 a year may apply for a waiver to be exempt from the ban.

“This has been a movement that’s gone on for a very long time,” Kathryn Garcia, New York City’s sanitation commissioner, told the New York Times. “Clearly, there are alternatives out there that are much more environmentally friendly.”

Brooklyn Magazine notes that last year, New York City “produced 28,000 tons of polystyrene, a material that clogs landfills and doesn’t biodegrade for hundreds of years.”

Christopher Hickey, a spokesman for the New York State Restaurant Association, told Reuters that these alternatives to foam containers can be 20 to 50 percent more expensive.

Andrew Rigie, the executive director of the New York City Hospitality Alliance, told Reuters that the ban may raise menu prices.

“Restaurants will have to decide if they are able to afford the increased costs, but I imagine some may unfortunately have to raise their prices,” said Rigie.

Diane Katz, a research fellow in regulatory policy at The Heritage Foundation, said that de Blasio should reassess his priorities:

“Mayor de Blasio would do better to focus on the more pressing problems plaguing New York City these days. The green lobby’s claims about polystyrene are largely nonsense, and the alternatives to foam consume more energy and produce more waste.”

According to the Competitive Enterprise Institute, alternatives to the foam containers are often not more environmentally friendly. They report that a research group called Franklin Associates found that:

“[T]he average 16-ounce polystyrene cup uses a third less energy, produces 50 percent less solid waste by volume, and releases a third less of so-called “green house gases” than does a 16-ounce paper cup with a sleeve. Over their lifecycles, polystyrene packaging products require 20 to 30 percent less water than do paper alternatives.”