Florida's 3rd District Court of Appeal has reversed a decision that previously allowed Coral Gables keep its polystyrene ban.

An appeals court has reversed a decision that previously gave the city of Coral Gables the ability to restrict businesses from giving out Styrofoam containers.

Florida's 3rd District Court of Appeal on Wednesday sided with the Florida Retail Federation, which challenged the city’s polystyrene ordinance in 2016.

Tuesday's decision leaves plans for a similar ban in Gainesville in limbo, as commissioners have modeled their plastic bag and polystyrene ordinance after Coral Gables. They have argued that laws blocking such bans are unconstitutional.

"It's disappointing that the major corporations and state Legislature continue to fight to pollute our environment and stop cities from protecting their communities," Gainesville Commissioner Adrian Hayes-Santos said of Wednesday's ruling.

Coral Gables was the first city in the state to adopt such a ban, and others followed.

In 2016, state law restricted cities from initiating a ban on the items. Coral Gables challenged the law, and two others, arguing that the law was unconstitutional. Initially, a trial court agreed and said the laws are vague and violated Miami-Dade County’s home rule amendment.

Tuesday’s opinion, written by Judge Norma Lindsey, said that wasn’t the case, adding that the interpretation of the home rule amendment was too broad and that the law is constitutional. She said the city was not singled out because the law applies to all cities statewide.

Currently, cities are restricted from adopting their own rules that are more strict or override existing state laws. Coral Gables still has the ability to ask for a rehearing before Tuesday’s ruling is finalized or can challenge the decision at a higher court.

In a press release issued by the retail federation, which referred to Coral Gables' ban as a "series of overreaching regulations," organization president R. Scott Shalley commended the decision, saying it will help ensure that Florida remains a business-friendly state and avoid a patchwork of regulations for businesses to contend with.

Aside from its polystyrene ban, Coral Gables later adopted a plastic bag ban. The retail federation is challenging both ordinances.

"We hope they’ll immediately repeal that ordinance at their next commission meeting," FRF spokesman James Miller said.

In Gainesville, city commissioners approved a ban modeled on the Coral Gables ordinance. They have been eagerly awaiting the appellate court’s decision. They, too, have argued that the state law is unconstitutional and passed an ordinance to ban local businesses from giving out plastic bags and Styrofoam containers. Those who don’t comply would risk being fined.

The city was threatened with a lawsuit by the Florida Retail Federation but moved forward anyway, going against their attorney's recommendation. Alachua County adopted a similar ban as well for its unincorporated area but opted to hold off until the Coral Gables case was decided.

Gainesville’s ban is set to take effect on Jan. 1, 2020.

Commissioner Hayes-Santos has been one of the city's leading voices on the issue. He said the latest ruling will be discussed at Thursday's meeting.

Local attorney Nathan Skop, a frequent commission critic, has repeatedly warned Gainesville's elected officials about implementing the ban. He said the reversal of the court's decision shows that the law preempts the city from regulating polystyrene containers.

"The Gainesville City Commission should respect the rule of law and take immediate action to repeal the unlawful ordinance they enacted to avoid litigation," Skop said.