A federal judge has halted an effort to purge voter rolls in Texas, saying that the secretary of state there had created a “mess” in questioning the citizenship of nearly 100,000 voters, few of whom have been confirmed as ineligible to vote.

David Whitley, the secretary of state, began a “good faith effort” last year to identify noncitizens on the voter rolls, according to the judge, Fred Biery, of the United States District Court in San Antonio. But what followed, the judge said, was plagued by missteps.

“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,” Judge Biery said in a ruling on Wednesday.

Despite alarms repeatedly raised by Republicans like Mr. Whitley, academic and government studies carried out over years have repeatedly found scant evidence of widespread voter fraud.