WASHINGTON — The Supreme Court on Monday dismissed a challenge to the voting map for Virginia’s House of Delegates, saying that state lawmakers were not entitled to appeal a ruling striking down parts of the map on race-discrimination grounds. The Supreme Court’s action is likely to help Democrats in elections this fall.

The vote was 5 to 4, and it scrambled some of the court’s usual alliances. Justices Clarence Thomas and Neil M. Gorsuch were in the majority, and Justice Stephen G. Breyer was among the dissenters.

The case, Virginia House of Delegates v. Bethune-Hill, No. 18-281, arose from a squabble among state officials. The state’s attorney general, a Democrat, decided not to appeal the ruling striking down the voting maps. The state’s House of Delegates, controlled by Republicans, filed its own appeal.

Writing for the majority, Justice Ruth Bader Ginsburg said the House was not authorized to pursue the appeal on behalf of the state and had not suffered the sort of direct injury that would give it standing to sue in its own right.