The US Supreme Court ruled Thursday against efforts to stop partisan gerrymandering, the practice of mapping legislative districts so that elections veer towards certain political victories.

In a 5-4 decision in which conservative justices held the majority, it was ruled that partisan gerrymandering was “beyond the reach of the federal courts,” according to the decision written by Chief Justice John Roberts Jr.

“Federal judges have no license to reallocate political power between the two major political parties,” he wrote, “with no plausible grant of authority in the constitution, and no legal standards to limit and direct their decisions.”

In an impassioned dissent read from the bench, Justice Elena Kagan, a progressive, called out the majority’s “complacency” on the issue, which continues to have profound effects on US elections.

“For the first time in this Nation’s history, the majority declares that it can do nothing about an acknowledged constitutional violation because it has searched high and low and cannot find a workable legal standard to apply,” Justice Kagan said.

“In throwing up its hands, the majority misses something under its nose: What it says can’t be done has been done,” she continued. “Of all times to abandon the court’s duty to declare the law, this was not the one. The practices challenged in these cases imperil our system of government. Part of the court’s role in that system is to defend its foundations. None is more important than free and fair elections. With respect but deep sadness, I dissent.”

Gerrymandering essentially takes a population and divides it in a way that allows the party controlling the boundary-drawing to easily win upcoming elections. The state legislature is given the power to draw these maps; therefore, districts can be redrawn to better serve the party with that majority.

The two most common practices to get a desired gerrymandered result are known as packing and cracking.

In packing, the party in power draws a single district around as many of the opposing party’s voters as possible, allowing for surrounding areas with less of those voters to get an equal, if less full, representation as the crowded opposition’s. This is common in states with a single urban area, such as Georgia, with Atlanta, which tends to vote blue against the red state.

In cracking, the controlling party splits up oppositional voters among several districts, in order to outnumber those voters in each district, again leading to a diluted vote from the opposing party.

Support free-thinking journalism and attend Independent events

The court’s decision responded to two lawsuits challenging gerrymandered maps in Maryland, controlled by Democrats, and North Carolina, controlled by Republicans.

In an email, Chris deLaubenfels of Let America Vote, the nonpartisan organisation that seeks to create more fair conditions for US voters, called the decision a “major blow to democracy in America.”

“The Supreme Court punted on protecting voters from extreme partisan gerrymandering, which strips Americans of their fundamental constitutional right: to use the ballot to choose their political representatives,” Mr deLaurebenfels wrote. “Instead, with partisan gerrymandering, politicians draw maps to choose voters they think will vote for them. That is antithetical to our democracy.”