Voters cast ballots at an early voting polling location for the 2020 Presidential election at Madison Square Garden in New York, U.S., on Monday, Oct. 26, 2020.
CNN  — 

A New York judge has blocked the state’s new congressional map, which would have given Democrats the advantage in 22 of the state’s 26 congressional seats, from going into effect for violating the state’s constitution.

Judge Patrick McAllister ruled Thursday that the map “was unconstitutionally drawn with political bias” by the Democratic-controlled legislature and created no competitive seats. The state legislature has until April 11 to pass a new map and submit it to the court for review, and McAllister further stated that the map had to receive “bipartisan support.”

However, under New York law, the order would be automatically stayed upon appeal, meaning it’s still not clear if the legislature will need to redraw the map before the June primary.

The decision is the second redistricting defeat in the courts for Democrats in a week. On Friday, a Maryland judge ordered a new congressional map to be drawn after ruling its map would unfairly hurt Republicans’ chances in the state. State courts in Ohio and North Carolina have previously blocked maps that advantaged Republicans.

The New York judge further ruled that the legislature violated a 2014 constitutional amendment, which gave primary control of redistricting to a bipartisan commission, because the legislature took over the process after that commission failed to agree on a map.

Former Rep. John Faso, a Republican who was one of the leaders of the challenge to the map, celebrated the ruling.

“New York has an explicit constitutional prohibition on partisan gerrymandering. The Democrats violated that prohibition. They did it knowingly, they did it willingly, they did it joyfully. And the court today struck them down,” Faso said in a call with reporters.

“This is a victory for the people of the state, and it’s a victory for competitive and fair elections in New York state.”

Democrats vowed to appeal.

“This is one step in the process,” Mike Murphy, communications director for Democrats in the state Senate, said in a tweet. “We always knew this case would be decided by the appellate courts. We are appealing this decision and expect this decision will be stayed as the appeal process proceeds.”

New York’s primary is scheduled for June 28. However, the ruling says it’s possible for the primary to be moved to August if new maps aren’t agreed to. According to McAllister, the latest the New York primary could be held is August 23, giving “about 100 days from today” for new maps to be drawn, candidates to gather signatures and file their candidacy, prepare primary ballots, and leave time for the appellate review process.

Democrats control the state legislature and the governorship in New York. The state lost a congressional seat due to slower population growth in the 2020 census.

There are now five states without enacted congressional maps for the 2022 midterm cycle with New York joining Florida, Maryland, Missouri and New Hampshire.

This story has been updated with additional developments.