MONTGOMERY, Ala. (AP) — A national redistricting battle over U.S. House seats swung toward Republicans on Friday, as a Virginia court invalidated a Democratic gerrymandering effort and Republicans in Alabama approved plans for new primary elections if courts allow GOP-drawn House districts to be used in the November midterm elections.

The Alabama legislation, which now goes to Republican Gov. Kay Ivey, is part of an effort by Republicans in Southern states to capitalize quickly on a recent U.S. Supreme Court ruling that significantly weakened Voting Rights Act protections for minorities.

Tensions ran high in the Alabama Statehouse. And Republican lawmakers in Louisiana and South Carolina also faced staunch opposition from civil rights activists and Democrats as they presented plans Friday to redraw their congressional districts.

The action came just a day after Tennessee enacted new congressional districts that carve up a Democratic-held, Black-majority district in Memphis. The state Democratic Party sued on Friday, seeking to prevent the districts from being used until after this year’s elections because of the tight time frame

Even before last week’s Supreme Court ruling in a Louisiana case, Republicans and Democrats already were engaged in a fierce redistricting battle, each seeking an edge in the midterm elections that will determine control of the closely divided House. That battle tilted further toward Republicans when the Virginia Supreme Court ruled Friday that Democratic lawmakers had violated constitutional requirements when placing a redistricting amendment on the ballot.