Virginia Sen. Donald McEachin (D-Henrico), speaking at the Capitol in Richmond in 2014, said he would be “interested” in running for the seat in the Richmond area. (Steve Helber/AP)

A federal panel on Thursday imposed a new congressional map that gives Democrats a chance to pick up a seat in the Richmond area in this year’s election.

The decision stems from the judges’ ruling last year that Virginia’s map illegally packed African American voters into the district of Rep. Robert C. “Bobby” Scott (D) at the expense of their influence elsewhere.

The new map seeks to change that by increasing the number of African American voters, who reliably vote for Democrats, in the district represented by Rep. J. Randy Forbes (R). The snakelike district stretches from Richmond southeast to Norfolk.

The three-judge panel of the U.S. District Court of the Eastern District of Virginia previously ordered the General Assembly to redraw the congressional map, but after a special session ended with no action, Gov. Terry McAuliffe (D) asked the judges to take over. Thursday’s decision is the result of their efforts.

Scott said in a statement that he welcomed changes to the district boundaries.

“I am pleased that the court has imposed a new congressional map that fixes the unconstitutional racial gerrymander of Virginia’s third congressional district,” the statement said.

Forbes’s office did not return messages seeking comment.

But the decision could be temporary. Congressional Republicans successfully petitioned the U.S. Supreme Court to hear their appeal of the ruling that threw out the map the state legislature instituted in 2012.

Of Virginia’s 11 representatives, eight are Republicans and three are Democrats.

Last month, Sen. A. Donald McEachin (D-Henrico) said he would be “interested” in running for the seat if the courts created a district he would have a good chance of winning.

“It’s an exciting opportunity, but I’m focused on session right now,” he said Thursday.

Del. Jennifer L. McClellan (D-Richmond) has also been mentioned as a potential candidate. She did not immediately return a call seeking comment Thursday.

The new map also alters the suburban Richmond district of U.S. Rep. Dave Brat (R), who ousted House Majority Leader Eric Cantor in 2014, with the help of tea party activists and conservative Republicans disillusioned with Washington.

Under the plan, Brat loses Hanover County, a tea party stronghold north of Richmond. With fewer conservative GOP voters in the district, a more moderate Republican, such as Mike Wade, who is a sheriff, could have a better chance of toppling Brat. Wade has ties to longtime Cantor allies and has said he is strongly considering a run.

The challenge to Virginia’s congressional district map and similar ones around the country were brought by attorney Marc E. Elias and funded by the National Democratic Redistricting Trust. Elias is general counsel to Hillary Clinton’s presidential campaign and worked for McAuliffe’s campaign.

The case has taken a circuitous route through the courts.

The judges ruled in favor of Elias in October 2014 and ordered the legislature to redraw the congressional map. Attorney Michael A. Carvin appealed on behalf of Virginia’s Republican congressional delegation.

While the appeal was pending, the Supreme Court decided a similar redistricting case in Alabama and ordered the federal panel to reconsider the Virginia one.

The judges affirmed their earlier decision, and congressional Republicans again appealed. Because of the special nature of redistricting challenges, appeals from three-judge panels go directly to the Supreme Court.

Rachel Weiner contributed to this report.