In this Oct. 3, 2017 photo, people line up outside the U.S. Supreme Court in Washington to hear arguments in a case about political maps in Wisconsin that could affect elections across the country. The justices ruled against Wisconsin Democrats who challenged legislative districts that gave Republicans a huge edge in the state legislature.(Photo: Associated Press)

WASHINGTON - The U.S. Supreme Court on Monday ruled against a Democratic challenge to Wisconsin's GOP-friendly legislative map while sidestepping the big constitutional questions the case raised about partisan gerrymandering.

The opinion leaves in place the current legislative lines, a political victory for Wisconsin Republicans.

But the ruling came on procedural grounds. The court found the plaintiffs lacked legal standing and unanimously sent the case back to federal district court.

Left unsettled is a huge question with massive political overtones: Can a redistricting plan be so partisan that it violates the Constitution?

The ruling came five months before the midterm elections. It means that Democratic hopes of winning back the state Assembly remain very slender, even if the party enjoys a "blue wave" at the ballot box.

But the high court also gave Democrats a chance to continue their case, leaving open the possibility they could eventually prevail after going back to the trial court. The lawsuit could continue for years — even beyond the next round of map-drawing that is slated for 2021.

"This is definitely not the end of the road," said Sachin Chheda, director of the Fair Elections Project, which launched the lawsuit.

In an interview, Chheda said that while the legal battle continues, "our focus in Wisconsin is going to be on passing independent redistricting reform. ... We're going to make it an issue in this fall's campaign about whether or not maps should be rigged or shouldn't be rigged."

Gov. Scott Walker’s spokeswoman Amy Hasenberg said the court “ruled unanimously in favor of the State of Wisconsin.

“This allows the governor and Legislature to continue focusing on issues that move Wisconsin forward,” she said.

GOP legislative leaders Robin Vos, the Assembly speaker, and Scott Fitzgerald, the state Senate majority leader, said in a statement:

“Democrats have been using the maps as an excuse for their failure to connect with Wisconsin voters. We believe the redistricting process we undertook seven years ago fulfilled our constitutional duty, and followed all applicable laws and standards that are required in redistricting."

The court said that while the lawsuit against the GOP map rested on a “theory of statewide injury to Wisconsin Democrats,” it needed to show harm to individual voters in specific districts.

The court found the 12 Democratic voters who brought the lawsuit hadn’t shown they had the legal ability to challenge the maps. Each voter lives in a single district, but they challenged the maps of all 99 Assembly districts.

“To the extent that the plaintiffs’ alleged harm is the dilution of their votes, that injury is district specific,” the court wrote in the majority opinion.

The majority found that if some districts were unconstitutional, the issue could be resolved by adjusting some — but not all — of the Assembly maps.

“Because that harm arises from the particular composition of the voter’s own district, remedying the harm does not necessarily require restructuring all of the State’s legislative districts. It requires revising only such districts as are necessary to reshape the voter’s district,” the court wrote.

The court said that while failure to demonstrate standing usually leads to dismissal, this case "concerns an unsettled kind of claim that the Court has not agreed upon."

As a result, it said it was sending the case back to the lower court "to give the plaintiffs an opportunity to prove concrete and particularized injuries using evidence that would tend to demonstrate a burden on their individual votes."

The majority opinion was written by Chief Justice John Roberts. There was no dissenting opinion.

In a concurring opinion, Justice Elena Kagan agreed that the plaintiffs lacked standing, but said the underlying issues would be back before the court, and expressed deep concern about gerrymandering.

"Partisan gerrymandering injures enough individuals and organizations in enough concrete ways to ensure that standing requirements, properly applied, will not often or long prevent courts from reaching the merits of cases like this one.

"Or from insisting, when they do, that partisan officials stop degrading the nation’s democracy," wrote Kagan, who was joined in her opinion by the court's other three liberal justices.

Two conservative justices — Clarence Thomas and Neil Gorsuch — offered a concurring opinion of their own. Thomas wrote that he would have not simply sent the case back to the lower court but dismissed it, because "after a year and a half of litigation in the District Court, including a 4-day trial, the plaintiffs had a more-than-ample opportunity to prove their standing."

Both parties were watching the case closely because of the political implications for 2018 and beyond.

Every 10 years, states must draw election maps based on data from the U.S. Census. In Wisconsin and most other states, lawmakers from the majority party can draw lines that help their side, and Republicans across the country took advantage of that power after sweeping the 2010 elections.

Wisconsin is often closely divided, but that doesn't reveal itself in legislative races.

In 2012, when Democratic President Barack Obama handily won Wisconsin, Democrats received nearly 52% of the vote in Assembly races yet took just 39 of the chamber’s 99 seats.

In 2016, Republican Donald Trump topped Democrat Hillary Clinton by the slimmest of margins in the presidential race, but the Republicans laid claim to a 64-35 majority in the Assembly.

The Democratic voters who brought the lawsuit contended both sides should have an equal chance to capture the same number of seats.

If one side can get 60 seats with 52% of the vote, the other should be able to do the same thing, they argued. They used social science methodologies to measure the fairness of legislative maps and asked the Supreme Court to adopt a formula for determining whether maps passed constitutional muster.

In a separate redistricting opinion Monday, the Supreme Court also sent back a challenge to a Democratic congressional map in Maryland, ruling that the plaintiffs had waited too long to seek relief. That case, too, will remain before the lower court.