HOUSTON — A federal judge on Monday rejected another last-ditch Republican effort to invalidate nearly 127,000 votes in Houston because the ballots were cast at drive-thru polling centers established during the pandemic.

The lawsuit was brought by conservative Texas activists who have railed against expanded voting access in Harris County, where a record 1.4 million early votes have already been cast. The county is the nation’s third-most populous and a crucial battleground in Texas, where President Donald Trump and Republicans are bracing for the closest election in decades Tuesday.

U.S. District Judge Andrew Hanen’s decision to hear arguments on the brink of Election Day drew concern from voting rights activists and came after the Texas Supreme Court rejected a nearly identical challenge over the weekend.

“We cannot allow participation to be limited simply because there are those who choose to think that they have the ability and the authority to decide who votes,” Democratic Rep. Al Green of Houston said outside the courthouse after the ruling. “It’s the Constitution that determines who votes.”

Hanen said those who oppose drive-thru centers — who were represented by former Harris County GOP Chairman Jared Woodfill — had no standing to bring a lawsuit. He added that people had already voted and that conservative activists had months to bring a challenge sooner.

But Hanen still expressed doubts about whether Texas law allowed anyone to vote from their car, even during a pandemic. “If I were voting tomorrow, I would not vote in a drive-thru just out of my concern as to whether that’s legal or not,” Hanen said.

Woodfill said he would immediately appeal the decision, accusing Harris County officials of using their office to help Democrats win Tuesday.

“If Harris County goes against Trump in large enough numbers, then we could lose Texas. And if Trump loses Texas then we lose the national election,” Woodfill said after the ruling. “As far as I’m concerned, this is ground zero.”

Another 20,000 or more voters were expected to use drive-thru polling locations Tuesday, said Harris County Clerk Chris Hollins, the county’s top elections official. Several voters who already used the drive-thru centers rushed to join mounting opposition to the lawsuit, including a Houston attorney whose wife was 35 weeks pregnant when she cast her ballot. She gave birth to twins Friday.

“My vote counts,” David Hobbs said. “My wife’s vote counts.”

Trump won Texas by nine points in 2016, but polls have shown Democrat Joe Biden still within reach in America’s biggest red state. Democrats also need to flip only nine seats to reclaim a majority in the Texas House for the first time in 20 years and have aggressively targeted several races in Harris County.

Woodfill has been a part of a battery of court challenges over moves to expand voting options during the COVID-19 pandemic. The challenges have not involved Trump’s campaign.

Harris County offered 10 drive-thru locations as an option for its nearly 5 million residents amid worries of spreading the coronavirus. Woodfill argued that Texas election law makes no explicit allowances for drive-thru voting and framed it is as an unlawful expansion of curbside voting, which is legal in Texas but limited to people who are unable to enter polling places because of their health.

Portions of the hearing were consumed by debate over what exactly qualified as a legal structure for a polling place under Texas law.

“You have a fundamental right to vote in a car?” Hanen tersely asked an attorney for the ACLU.

Woodfill’s lawsuit noted that all but one of the drive-thru centers were set up “in Democrat areas of the county.” More than 40% of Harris County residents are Latino, and about one in five residents are Black.

The lawsuit drew objections even from Republicans, including former Texas House Speaker Joe Straus. Republican Sen. John Cornyn, who is facing the toughest reelection battle of his career Tuesday against Democrat MJ Hegar, also said during a weekend campaign stop that the Texas Supreme Court made the right decision earlier in rejecting an identical challenge.

The Texas Supreme Court, which is controlled entirely by Republicans, rejected an identical lawsuit last month and on Sunday refused to invalidate the votes already cast. The state’s highest court did not explain its decision.

Hollins had asked Republican Gov. Greg Abbott to affirm that the drive-thru locations are legal but received no response.