The GOP may have just lost as many as four seats in the House—certainly at least one.

Yesterday, the Supreme Court of Pennsylvania ruled, by a vote of 5–2, that the state’s congressional districts amounted to an unconstitutional partisan gerrymander.

And here’s an even greater shock— the PA Supreme Court just so happens to have five Democrats and two Republicans.

Because only a brief order has been released, it is unclear what the exact legal reasoning will be. We’ll have to wait for the full opinion to find that out. For now, the court has just said that the “Congressional Redistricting Act of 2011 clearly, plainly and palpably violates the Constitution of the Commonwealth of Pennsylvania, and, on that sole basis, we hereby strike it as unconstitutional.”

Based on the briefs filed by the challengers, the opinion will probably hold that gerrymandering violates free speech or “equal elections” provisions of the PA Constitution.

But the reasoning doesn’t matter all that much because, as the court went out of its way to emphasize in today’s filing, the ruling rests on the “sole basis” of the “Constitution of the Commonwealth of Pennsylvania.” In other words, it is unlikely that the U.S. Supreme Court will review this decision, since federal courts cannot challenge a state court’s interpretation of state law.

The court also directed the legislature to “submit a congressional districting plan that satisfies the requirements of the Pennsylvania Constitution…for consideration by the Governor on or before February 9, 2018.” If the Democratic Governor Tom Wolf doesn’t approve it before February 15, then—wait for it—the PA Supreme Court itself will then “proceed expeditiously to adopt a plan” to redistrict before the 2018 midterms.

It is difficult to exaggerate how damaging this ruling is to the GOP.

Democrats need to win a net of 23 seats to take back the House. This decision may hand them 3 or 4 right off the bat.

There is no doubt that Pennsylvania is gerrymandered in favor of Republicans. I have little sympathy for partisan gerrymandering and would like to see it abolished, but the way to accomplish that is either with districts drawn by computer algorithms or by independent commissions.

But here is what happened in Pennsylvania: in 2015 Democrats won three supreme court vacancies in a clean sweep, ending the Republican majority. Democratic organizations, like the League of Women Voters that spearheaded the lawsuit in this case, realized they could exploit the results to circumvent the legislature and get a new map, all while never setting foot in a federal courthouse.

Republican legislators have pledged to seek a stay from SCOTUS, but legal pundits think such an endeavor is a pipe dream. Mark Joseph Stern at Slate writes that the decision is “almost entirely immune from review by the U.S. Supreme Court.”

“This case was designed from the get-go to get to the Pennsylvania Supreme Court and no further,” Justin Levitt, an election-law scholar and associate dean at Loyola Law School in Los Angeles, told the New York Times. “There are one or two exceedingly long-shot ways that Republicans might attempt to get this in front of the Supreme Court. But I would not lay odds on that.”

That’s because while Congressional representatives are obviously members of the federal government, this fact alone is probably insufficient to trigger SCOTUS review. For the justices to assert jurisdiction, they would have to find that the case implicates federal law.

Rick Hasan at the Election Law Blog notes that the most likely federal question would arise under the Elections Clause of the U.S. Constitution, which provides that the “Times, Places and Manner of holding Elections for Senators and Representatives, shall be prescribed in each State by the [state] Legislature.” Pennsylvania lawmakers could argue that the court’s decision effectively stripped them of that federally-guaranteed power.

A similar argument was advanced with respect to presidential electors by Justices Rehnquist, Scalia and Thomas in Bush v. Gore. The trio argued that the Florida Supreme Court had interpreted state law so unreasonably as to violate Article II’s requirement that the electors be appointed in a “Manner as the Legislature…may direct.”

Again, this argument isn’t likely to gather steam.

As Mark Harris, a Republican consultant in Pennsylvania lamented, “There doesn’t appear that there’s much recourse, so we’re just hosed.”