As acting Texas secretary of state, David Whitley sought to purge the state’s voting rolls of nearly 100,000 suspected non-citizens.

He failed — and that led directly to the end of his brief tenure in office. He sent his resignation to his boss and friend, Gov. Greg Abbott, on Monday, after falling short in a confirmation bid.

Republicans control the state Senate, but there were enough Democrats to prevent Whitley’s confirmation.

In January Whitley announced his office had identified 95,000 non-citizens in Texas thought to be non-U.S. citizens, and he sent the list to the Texas attorney general for possible prosecution.

This, says the Austin American-Statesman, caused “unsupported fears of rampant voter fraud while emboldening Republican politicians who had made similar voter fraud claims — including President Trump, who tweeted that “voter fraud is rampant.”

“It soon became apparent … that many of the suspect registered voters were naturalized U.S. citizens who were eligible to vote, and Whitley later acknowledged that his office was aware that naturalized citizens could have been included in the list,” the American-Statesman says.

It turns out that about a quarter of all those on Whitley’s list were actually naturalized citizens.

In February, a federal judge issued an order blocking Texas counties from demanding that those on Whitley’s list  prove their citizenship.

U.S. District Judge Fred Biery called Whitley’s investigation and report a “ham-handed” example of “the power of government to strike fear and anxiety and to intimidate the least powerful among us.”

“Democrats and civil rights groups cheered Whitley’s resignation … declaring victory after months of a coordinated effort among at least 10 civil rights groups to oppose his nomination,” reports the Washington Post. One civil rights group called it “a win for all voters.”

One key reason Democrats were united on this issue — in Texas, that is far from certain — is that Whitley’s investigation concentrated on immigrants and minorities.

“As [Judge] Biery noted, no native-born citizen was wrongfully threatened with being kicked off the voter rolls; only new Americans were,” says the Post.

Voting-rights groups filed multiple lawsuits on behalf of eligible voters. Texas reached a settlement with them last month.

“Gilberto Hinojosa, chairman of the Texas Democratic Party, thanked … Democrats for remaining firm in their opposition to Whitley, ‘keeping a watchful eye on Republicans who sought to scare, confuse and intimidate Texans from participating in their democracy,’” says the American-Statesman.