The ruling chastised the Republican-led Legislature not only for working with political operatives to violate the constitution in order to benefit the GOP, but also for making important decisions behind closed doors and destroying documents and deleting emails when they knew the maps would be challenged in court.

"The Legislature itself proclaimed that it would conduct the most open and transparent redistricting process in the history of the state, and then made important decisions, affecting numerous districts in the enacted map, outside the purview of public scrutiny," the ruling said.

The court questioned whether the full extent of the political maneuver was exposed in the case.

"Since many of the e-mails were deleted or destroyed, we still may have only a partial picture of the behind-the-scenes political tactics," Justice Barbara Pariente wrote for the majority in the 5-2 opinion. Justices Charles Canady and Ricky Polston dissented.

The court recommended the Legislature make all its decision in public when it redraws the maps and to save all emails and documents related to the effort.

The Legislature will have to have the new maps ready by October, which will require a special session to approve them. House Speaker Steve Crisafulli and Senate President Andy Gardiner were reviewing the decision and neither planned to comment on it Thursday.

Florida has 17 Republican U.S. House members and 10 Democrats despite Democrats having an advantage in voter registration. Florida has 4.6 million Democrats and 4.2 million Republicans.

The ruling will affect districts held by Democratic Reps. Corrine Brown, Kathy Castor, Ted Deutch and Lois Frankel and Republican Reps. Mario Diaz-Balart, Carlos Curbelo, Ileana Ros-Lehtinen and David Jolly.

Brown, who's long, narrow, oddly-shaped district is often used as the most obvious case of a gerrymandered district, criticized the opinion. Her district is designed to contain a majority of African-Americans.

"Minority communities do not live in compact, cookie-cutter like neighborhoods, and excessive adherence to district 'compactness,' while ignoring the maintenance of minority access districts, fragments minority communities across the state," she said in a statement emailed by her office.

A coalition that included the League of Women Voters challenged the lines, saying Republicans who drew them up ignored the new constitutional requirements approved by voters in 2010. A lower court agreed that GOP leaders and operatives made a mockery of the amendment, but only ordered two central Florida districts be redrawn.

The Supreme Court said that wasn't good enough.

"This is a complete victory for the people of Florida who passed the Fair Districts Amendment. The court has made it abundantly clear that partisan gerrymandering will not be tolerated. We look forward to the legislature following the constitution and the directives of the court," said David King, a lawyer for the coalition.

House Speaker Steve Crisafulli and Senate President Andy Gardiner were reviewing the decision and neither planned to comment on it Thursday.

The Associated Press