Foam cups, plates, clamshells, coolers, hard-plastic utensils and packing peanuts are no longer banned in New York City, a Manhattan judge ruled on Tuesday, striking down Mayor Bill de Blasio’s first major environmental effort.

New York had been the largest city in America to prohibit the sale, possession and distribution of single-use polystyrene foam, threatening violators with steeper fines than those for marijuana offenses. But Manhattan Supreme Court Justice Margaret Chan said the ban was excessive — because, contrary to the claims of the city’s sanitation commissioner, the white squeaky stuff can be recycled.

Close video The Styrofoam industry's anti-ban argument Greenhouse host Tony Dokoupil explores what kind of “ridiculous” arguments the foam industry is using to battle a ban. Greenhouse host Tony Dokoupil explores what kind of “ridiculous” arguments the foam industry is using to battle a ban. share tweet email Embed

“The Commissioner’s concern is not justified given abundant evidence showing a viable and growing market for not just clean EPS (expanded polystyrene foam) but post consumer EPS material,” Chan wrote in her decision, a major victory for the foam industry.

The material in question is commonly known as “styrofoam,” as it is referred to in the city’s initial release on the ban. But as Dow Chemical is at pains to point out these days, STYROFOAM® is in fact a brand-name insulation product they’ve been making for 60 years. The generic name is polystyrene foam.

The city immediately pledged to fight the decision, reiterating their case that such foam cannot be profitably recycled. Last year, the city collected nearly 30,000 tons of single-use foam, which is more than six pounds of foam per resident. City schools alone were throwing away 800,000 foam lunch trays a day.

“These products cause real environmental harm and have no place in New York City,” de Blasio said in his release about the ban.

WATCH: Jakarta rivers consumed by harmful waste

Dozens of other cities, including Washington, D.C., Minneapolis and San Francisco, have also banned the stuff. But New York’s ban was the biggest blow to the industry, which launched a well-funded, tightly coordinated campaign to overturn the legislation with a lawsuit.

The pro-foam effort was led by Dart Container company, which joined with restaurant owners to argue that the ban is “capricious,” “irrational” and “arbitrary.” In court documents, these fans of foam argued that the city’s review of the market for recycled foam was a “farce,” and that de Blasio was pandering to the city’s ultra-liberal green fringe.

They also argued that the ban was illegal and a terrible burden on the city’s already strapped food sellers, who would have had to pay more for compostable paper containers.

In response, the city has pointed to the experience of Leith Hill, the owner of an all-natural cafe called Ellary’s Greens. She pays a bit more for paper containers, but she says the prices are falling fast as more businesses switch from foam to paper.

“That’s the hope,” she recently told MSNBC. “Foam is a product of the past.”