Updated at 6:12 p.m. with a statement from the attorney general.

AUSTIN — A federal judge in San Antonio has ordered Texas to tell counties not to remove people from voter rolls as part of the state's effort to review the citizenship of tens of thousands of voters.

In his order Wednesday, U.S. District Judge Fred Biery of San Antonio told the secretary of state to direct counties that are not being sued, or have not agreed to refrain from sending "notices of examination letters," to stop sending them and to not remove voters from voter rolls without the court's approval and proof that a person is not a citizen.

He also told the more than a dozen counties that are named as defendants in the case not to remove anyone from the voter lists without his approval and to tell him whether they would voluntarily agree not to send any more notices of examination.

"Local officials can continue to find out if in fact someone is registered who is not a citizen, so long as it is done without communicating directly with any particular individual on the list," Biery wrote.

Going forward, Biery said the Secretary of State's Office could proceed with monthly updates to its list of potential noncitizen voters, but it has to direct local voting officials not to send notices or cancel a voter's registration without his approval.

Biery denied a motion from state lawyers asking him to dismiss the case, saying he had seen "highly credible evidence presented by plaintiffs."

The order comes as the Republican-dominated Senate Nominations Committee prepares to vote on interim Texas Secretary of State David Whitley's nomination Thursday. All 12 Senate Democrats have said they would not support his nomination, which means they have enough votes to block his confirmation if it reaches the Senate floor.

Attorney General Ken Paxton said Biery's order "deprives state and county election officials of the capacity to faithfully execute their duties under state and federal law to maintain voter rolls" even though the judge said there is "unanimity" that noncitizens should not vote.

"While we appreciate the court's acknowledgment that the Secretary of State took his actions in good faith, no state official violated any applicable law and there is no need for a federal court takeover of state activities," Paxton said in a news release. "We are weighing our options to address this ruling and to continue making our case that ineligible voters should not vote and counties are free to continue to follow the law and keep their voter rolls clean."

Lawyers for the plaintiffs, which include voter advocacy groups and several naturalized citizens who ended up on the list for investigation, celebrated the order.

"This is an extremely important ruling to help prevent eligible voters in Texas from getting kicked off the voter rolls," Thomas Buser-Clancy, staff attorney for the ACLU of Texas, said in a news release. "Today, the court recognized what we have been saying all along: This voter purge discriminates against naturalized citizens using a process that the court described as 'ham-handed' and 'threatening."

Lawyers for the Mexican American Legal Defense and Education Fund, which had asked Biery to temporarily restrain several counties in their lawsuit that planned on canceling the registration of some of their clients, applauded the order.

"The judge agreed with our argument that the voter purge should be halted until he decides the important constitutional issues raised in the case," Nina Perales, a lawyer with MALDEF, said in a news release. "Naturalized citizens should rest easy that for now they will not receive letters challenging their right to vote."

A statement from the Texas secretary of state said the office was working to comply with Biery's order.

"At this time, we are preparing a communication to Texas counties," the statement read. "Secretary Whitley met personally with representatives of the plaintiffs today, solicited their feedback, and made clear that every option is on the table."

Biery's order stems from an advisory Whitley's office sent to counties in late January that said the state had identified 95,000 people on Texas voter rolls who had received driver's licenses while in the country legally but were not U.S. citizens. The advisory said 58,000 of those had voted in one or more elections since 1996 and asked counties to investigate whether noncitizens were voting.

But civil rights groups and voting rights advocates said those numbers were flawed and did not account for people who had received their licenses before becoming citizens. Three lawsuits against the state and several counties followed.

This week, state officials admitted in court that 25,000 people who had already proven their citizenship to the Department of Public Safety had erroneously ended up on the list for investigation.

Biery skewered the secretary of state in his order, concluding that the office "though perhaps unintentionally, created this mess." He sympathized with the need to ensure that noncitizens were not voting but criticized the state for its approach.

"Notwithstanding good intentions, the road to a solution was inherently paved with flawed results, meaning perfectly legal naturalized Americans were burdened with what the Court finds to be ham-handed and threatening correspondence from the state which did not politely ask for information but rather exemplifies the power of government to strike fear and anxiety and to intimidate the least powerful among us," he wrote.

He described the state's realization that it had erroneously placed 25,000 citizens on its initial list for investigation as an "oops moment" and called the state's effort "a solution looking for a problem."

"The evidence has shown in a hearing before this Court that there is no widespread voter fraud," he said. "The challenge is how to ferret the infinitesimal needles out of a haystack of 15 million Texas voters."

CORRECTION, 2:36 p.m., Feb. 27, 2019: A headline in an earlier version of this story incorrectly said the federal judge had ordered Texas counties not to remove people from voter rolls. The judge ordered the Texas Secretary of State to direct counties not to do so.