This week, the Florida Supreme Court struck another blow against gerrymandering in the Sunshine State, and approved a congressional map it hopes will finally end years of legal battles over district lines.

In a decision Wednesday — a follow-up to an earlier ruling from July that threw out much of the state's congressional map because it was drawn with partisan intent — the justices gave another victory to the groups that had sued to strike down the old map.

Five of the state Supreme Court's seven justices essentially told the legislature: If you can't agree on a proper map, we'll pick one for you. They approved a trial judge's ruling accepting the Florida House of Representatives' plan for 19 of Florida's 27 districts — but rejected its proposal for the other eight, which cover South Florida.

For the remaining eight districts, the courts instead approved a map proposed by those groups that had sued — including the League of Women Voters and Common Cause.

Two justices dissented from the decision — and one argued that the map the majority approved was drawn by "Democratic operatives," so it should have been discredited. Yet the majority justices responded that they reviewed the plans presented and approved those with districts that were more compact and that better utilized existing political and geographic boundaries.

Though further litigation in federal court is still possible, the maps are set to go into effect for the 2016 elections — four years after redistricting was supposed to be completed.

The background: Florida voters banned partisan gerrymandering in 2010 — yet Republicans kept winning tons of the state's congressional seats

Back in 2010, Florida voters overwhelmingly approved a constitutional amendment banning partisan gerrymandering. The strongly worded amendment, which passed with more than 62 percent support, said that districts "may not be drawn to favor or disfavor an incumbent or political party."

Yet Florida's map-drawing process was still left to the state legislature, then controlled by Republicans. And when the legislature redistricted shortly afterward, the maps it came up with seemed to many to be slanted in favor of the GOP. Indeed, in 2012 Republicans got 51 percent of the US House votes — but they ended up with 63 percent of the seats, 17 out of 27.

There are potentially other factors that could explain a pro-GOP slant in House districts. But the League of Women Voters, several media organizations, and some voters saw partisan motivations at play — arguing that in many instances, the public redistricting process was a sham, with the real decisions being made by partisan Republican operatives behind the scenes. So they filed suit to try to get the map struck down.

In July, they won — a five-vote majority of the Florida Supreme Court ruled against the legislature. The majority included two justices appointed by former Gov. Charlie Crist (who was then a Republican), two appointed by former Gov. Lawton Chiles (a Democrat), and one whose appointment was the result of an agreement from Chiles and Jeb Bush — so things weren't purely partisan. Two justices dissented, both of whom were appointed by Crist.

As the majority put it in this week's ruling, they concluded that "Republican political operatives successfully infiltrated the redistricting process with the coordination and cooperation of the Legislature, resulting in a redistricting plan that was tainted with improper partisan intent."

In July, the Court ordered eight districts to be redrawn

The state Supreme Court didn't throw out the whole map, but rather ordered that eight specific districts be redrawn, as well as all other districts affected by those new borders.

For instance, the fifth district in the northern part of the state, held by Democrat Corrine Brown, was viewed as particularly egregious:

Frequently referred to as "serpentine," it contorts and stretches vertically to scoop up several urban centers across Florida. This is a typical sign of gerrymandering, indicating that many voters who tend to support Democrats are being artificially packed into one unusual district, to dilute their voting power.

Republicans in the legislature claimed that that district was only drawn that way to make it a majority-minority district, to comply with the federal Voting Rights Act, as the state Senate president testified. However, the Senate GOP's lead redistricting expert cast doubt on this claim when he testified that putting more African Americans in the district was "not a necessity."

But eventually, the state Supreme Court has concluded that the legislature "failed to meet its burden to demonstrate" that the fifth district "passes constitutional muster," and has ordered that it be redrawn in "an East-West orientation." It ordered seven other districts redrawn, too, for a variety of reasons.

But the legislature couldn't pass a new plan — so the court has now stepped in

Yet the legislature couldn't get it done. The Florida House of Representatives passed one new map, the Senate passed another, and the two chambers couldn't agree on a final version. So, with the clock ticking before the 2016 election, the state's highest court has settled the matter — for now, at least. (Further challenges could be brought in federal court.)

The new map the Court approved is above. No, the boundaries don't all look exactly alike — they also take into account demographics and local geography, which don't always look that neat. But you can see that the districts no longer contort in truly bizarre ways like the old fifth district did above — the boundaries here seem to make a lot more sense.

A report from the Miami Herald's Mary Ellen Klas shows how absurd it is that in December 2015 — years after the redistricting process was supposed to have ended — members of Congress are still trying to figure out whom they're representing. Klas writes that Rep. Vern Buchanan responded to the ruling by saying, "It’s sad that I will no longer have the honor of representing the southern part of Sarasota County, but I’m looking forward to meeting the people of Hillsborough County."

But overall, the ruling is just the latest indication that the justices are taking a sweeping anti-gerrymandering constitutional amendment approved by Florida's voters in 2010 very seriously. If a proposed map doesn't meet the justices' standards, they won't hesitate to strike it down — and pick a different map instead.