The U.S. Supreme Court on Monday granted the bid of a Republican New York congresswoman to stop state officials from redrawing her district in a way that could favor Democrats.

The ruling is a victory for Rep. Nicole Malliotakis, a Republican representing New York’s 11th District, ahead of the November midterms. A state trial court ordered the state to redraw the district to include a greater number of Black and Latino voters, which could deliver New York City’s only Republican seat to a Democrat.