WASHINGTON — The U.S. Supreme Court today seemed concerned that race may have played too large a role in the drawing of electoral districts in Virginia, to the detriment of black voters.

Several justices hearing arguments in the case suggested a lower court failed to apply the correct standard when it upheld new boundaries for 12 state legislative districts.

The case is the first of two redistricting disputes the court was considering. In the second case, the state of North Carolina is challenging a lower court ruling that struck down two districts as unconstitutional because they relied too heavily on race.

The claim made by black voters in both states is that Republicans created districts with more black voters than necessary, making neighboring districts whiter and more solidly Republican.

Justice Elena Kagan said it “defies belief” that the lower court in the Virginia case required all 12 districts to meet the same standard of having a 55 percent black majority.

“That’s a problem,” she told Paul Clement, a lawyer representing the Virginia State Board of Elections.

Justice Anthony M. Kennedy, who has been a swing vote in voting rights cases, also said he had problems with the lower court’s reasoning in the Virginia case.

But Justice Samuel A. Alito Jr. said the law’s requirements are “very, very complicated” and wondered if the justices should be wary of inviting more litigation every time a legislature redraws district boundaries.

Justice Stephen G. Breyer said the lower court may not have used exactly the right standard, but he wondered if it mattered to the outcome.

Arguing for the Virginia challengers, attorney Marc Elias said the lower court was wrong to use a “one size fits all” standard regardless of the different voting patterns and demographics across the 12 districts.

The justices have frequently considered the intersection of race and politics. In 2015, Kennedy joined the four more liberal justices to order a review of Alabama legislative districts. Breyer wrote for the court that the Alabama legislature and the federal court that ruled on the plan had taken a “mechanically numerical” view, instead of trying to figure out what percentage of black voters were needed to elect a candidate of their choice.

In 2013, Kennedy sided with more conservative justices to effectively block a key component of the landmark Voting Rights Act that led to the election of African-Americans across the South. Its provisions requiring states to create and preserve districts in which minority voting groups can elect their candidate of choice remain in effect.

North Carolina and Virginia argue that they were trying to preserve majority-black districts. In Virginia, lawmakers made sure that at least 55 percent of the eligible voting-age population in each district was African-American. Redistricting follows the once-a-decade census, when population changes require the adjustment of political districts.

In North Carolina, the federal court also struck down some state House and Senate districts, and last week, those judges ordered new districts drawn and special elections held next year.

North Carolina Republicans have used the current districts to achieve vetoproof majorities in both chambers. In addition, they hold 10 of the state’s 13 congressional seats. By contrast, statewide contests suggest a narrower gap between the parties.

Two Republicans won statewide elections last month, President-elect Donald Trump with just under 50 percent of the vote and Sen. Richard Burr, with 51 percent. Republican Gov. Pat McCrory conceded his re-election effort today after nearly a month of uncertainty.

The cases are Bethune-Hill v. Virginia State Board of Elections, 15-680, and McCrory v. Harris, 15-1262.