AUSTIN (AP) — A federal judge Friday blocked Texas from eliminating straight-ticket voting, a decision that would allow for choosing one party’s entire slate of candidates in the November election that is now less than six weeks away.

Most states don’t offer straight-ticket voting. Texas has for decades, but Republican Gov. Greg Abbott signed a law removing the option in 2020. That measure was pushed through by a GOP-controlled Legislature that argued the change would encourage voters to weigh down ballot races and cast better-informed ballots on Election Day.

Democrats sued over the change in March, pointing toward long lines in Houston on Super Tuesday, when some voters waited more than an hour to vote. They said the law disproportionately hurts Black and Latino voters in big urban counties, where longer ballots result in longer wait times.

U.S. District Judge Mariana Garcia Marmolejo said amid the coronavirus pandemic, which has claimed more than 15,000 lives in Texas, the state should not risk making voting a longer process.

“Texas’ rules around voting during the pandemic have been perplexing,” Garcia Mamolejo wrote. “Administering in-person voting the same way it has been administered for 100 years is not about a mere convenience to voters, it is about running an efficient electoral process that guarantees Texans a more effective opportunity to cast a ballot in a time when any additional time spent in line endangers the safety of poll voters, poll workers, and others not at the polls.”

Republican Texas Attorney General Ken Paxton did not immediately react to the ruling, although an appeal is likely.

Garcia Mamolejo said claims that voting machines couldn’t be reconfigured so close to the Nov. 3 election were unconvincing, doubting it “will be as onerous as Texas claims.”

The lawsuit was filed in federal court along the Texas border in Laredo. Abbott signed the law repealing straight-ticket voting in 2017, a year after President Donald Trump won the state by 9 points.

But that same election also saw Houston and Dallas continue shifting more solidly in Democrats’ favor, and ousting more local GOP officeholders.

The lawsuit was one of several voting challenges filed by Democrats in Texas leading up to November. Republican leaders have refused to expand mail-in voting in Texas during the pandemic. Next week, the Texas Supreme Court will hear arguments in a case that will determine whether Harris County can send mail-in voting applications to more than 2 million registered voters.

“Texas Democrats will have to continue to win at the ballot box to protect the right vote,” said Gilberto Hinojosa, chairman of the Texas Democratic Party.