Mayor Bill de Blasio's office said it will continue to explore options on banning Styrofoam following a Manhattan Supreme Court judge's decision that shut down the plan.

Judge Margaret Chan sided with the Restaurant Action Alliance and others who sued the Department of Sanitation over its block, which began July 1, contending that the proposal was "arbitrary and capricious." She said the city failed to take into account the options available for recycling expanded polystyrene foam (EPS).

"The (sanitation) commissioner's conclusions that recycling post consumer EPS was neither environmentally effective nor economically feasible are based on one finding," Chan wrote in the decision which was made public Tuesday.

Mayor Michael Bloomberg first proposed the ban during his last year in office and de Blasio followed through. Under the plan, all styrafoam packaging, except those used to store meats and fish, were banned and store had a grace period until Jan. 1 to get rid of their EPS products.

More than 28,500 tons of EPS materials are in city landfills and it costs an average $3.14 million a year to dispose of them, according to the city.

A spokeswoman for the mayor's office said de Blasio disagrees with the ruling.

"These products cause real environmental harm, and we need to be able to prevent nearly 30,000 tons of expanded polystyrene waste from entering our landfills, streets, and waterways," spokeswoman Ishanee Parikh said in a statement. "We are reviewing our options to keep the ban in effect."

The sanitation department consulted with the city's contractor for metal, glass and plastic recycling, Sims Municipal Recycling, along with other companies. Sims said its machinery could only recover 39-45% EPS and the rest would go to landfills. Dart Container Corporation, who is a plaintiff in the suit, offered to buy and install their machines which they claim can recycle at least 75% of EPS and save the city $400,000.

Although the sanitation department disregarded his offer, Michael Westerfield, the corporate director of recycling programs at Dart Container, said he's still willing to work with the city.

"The victory here is for the environment and for recycling," he said in a statement.