This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

The Supreme Court said Thursday that federal courts must stay out of disputes over when politicians go too far in drawing district lines for partisan gain — a ruling that could fundamentally affect the balance of power in state legislatures and Congress.

Chief Justice John Roberts wrote the 5-4 decision for the conservative majority.

The court was asked to consider when politicians go too far in drawing lines for partisan gain in a set of cases arising from North Carolina and Maryland.

The North Carolina case was brought by Democrats challenging Republican-drawn maps, while the Maryland case was brought by Republicans challenging a Democratic map.