WASHINGTON (AP) — The Supreme Court seemed to struggle Monday with how to resolve a case that could help flip control of the Virginia House of Delegates to Democrats.

The justices heard arguments in a case about the map Virginia has used to choose House delegates, a map a lower court ruled discriminated against black voters. The lack of clarity about how the high court will resolve the case was odd because the justices had previously allowed the lower court to approve a replacement map. State elections officials are currently preparing to use that replacement map for primary contests in June. The replacement map is seen as favorable to Democrats and could help them gain control of the House.

The Republican-controlled House, meanwhile, is defending the map it drew in 2011, after the last census, which has been used in the four elections since. Democratic voters sued in 2014, accusing Republicans of packing black voters into certain districts to make surrounding districts whiter and more Republican. Republicans currently hold control of the House of Delegates by a slim 51-49 margin.

The map Virginia officials are currently using was created after the lower court ruled 2-1 in June that the previous, legislature-drawn map improperly factored race into the drawing of 11 of the 100 House districts. After the House and Democratic Gov. Ralph Northam were unable to reach an agreement on a redistricting plan, the lower court chose a new map from a series of proposals submitted by a special master.

The justices had been asked to block the lower court from approving a new map while the case proceeded in the Supreme Court, but the justices declined in January. So Virginia election planning has moved forward with the new plan. Candidates have until March 28 to sign up for primary contests, which are set for June 11, ahead of November’s election. Any decision by the Supreme Court that changes what map is used could be hugely disruptive if the justices don’t move quickly.

However the Supreme Court decides, it will be the last time the map is used because it will need to be redrawn following the results of the 2020 census.

On Monday, justices questioned both whether the House of Delegates had a right to bring the case to the high court and whether the districts it drew were problematic. Justice Brett Kavanaugh noted that black lawmakers had been supportive of the original map and that it was given required approval by the Justice Department. But Justice Elena Kagan seemed to suggest lawmakers should have done a more thorough, district by district analysis when drawing boundaries.

This is the second time the case has been to the Supreme Court. In 2017 the justices voted to throw out a ruling that upheld the challenged districts. It told the lower court to revisit the case and apply a different legal standard. The lower court then concluded that the 11 districts violated the Constitution’s equal protection clause.

The case is 18-281, VA House of Delegates v. Bethune-Hill.