The Supreme Court ruled in a 5-4 vote Thursday that political gerrymandering is a power delegated to Congress, not the judiciary.

Deciding against voters and other plaintiffs in Maryland and North Carolina who filed suits challenging their states’ redrawn congressional district maps, the Court is leaving the standard to be decided at the state level.

“We conclude that partisan gerrymandering claims present political questions beyond the reach of the federal courts,” Chief Justice John Roberts said for the conservative majority. “Federal judges have no license to reallocate political power between the two major political parties, with no plausible grant of authority in the Constitution, and no legal standards to limit and direct their decisions.”

The two cases brought before the high court accused Republicans in North Carolina and Democrats in Maryland of drawing new lines for congressional districts to benefit their parties. In Maryland, the redrawing of lines could remove two Republican seats in the House of Representatives. The case in North Carolina benefited Republicans who, by drawing new lines, could limit Democrats’ power and ensure their own.

Chief Justice Roberts, delivering the opinion of the Court, quoted Marbury v. Madison, saying, “It is emphatically the province and duty of the judicial department to say what the law is.” Roberts added, “In this rare circumstance, that means our duty is to say ‘this is not law.’”

The Supreme Court dismissed the cases for lack of jurisdiction.