NEW YORK (AP) -- Whether or not you believe that voting fraud is a problem in the U.S., one thing is certain: Tidying up outdated voter rolls is sometimes easier said than done. Just ask election officials in the nation's largest city.
After an independent review found that New York City's voting lists contained people who were dead or in prison, elections officials began an aggressive purge in 2014 and 2015 that eliminated more than 200,000 supposedly invalid registrations.
The result? A record number of complaints during the 2016 presidential primary from legal voters who turned up to cast a ballot, but found that they were no longer registered.
"Democracy itself is under attack," New York Attorney General Eric Schneiderman, a Democrat, declared last week after announcing plans to join a federal lawsuit over the way the purge was handled.
New York City's bungled purge offers a cautionary tale for elected officials, led by President Donald Trump, who warn that inaccurate voter rolls are leading to voter fraud across America.
Trump has vowed to establish a commission to examine the situation. Senior policy adviser Stephen Miller sounded the alarm again on Sunday.
"You have millions of people who are registered in two states or who are dead who are registered to vote. And you have 14 percent of noncitizens, according to academic research, at a minimum, are registered to vote, which is an astonishing statistic," Miller said, using a statistic hotly contested by many academics.
He also claimed, without offering evidence, that voters from Massachusetts were illegally bused into New Hampshire during the last election — an allegation denied by New Hampshire Republicans.
It's unclear exactly how many people are registered to vote in America who shouldn't be.
Federal law requires election officials to remove people after they die or move, but that doesn't always happen in a timely way.
In New York City, the lawsuit said the Board of Elections disregarded several rules governing the maintenance of voter lists.
People who hadn't voted since the 2008 presidential election were sent letters demanding that they verify their status. If they didn't respond within two weeks in some cases, their registration was canceled. City researchers took other unorthodox steps, too, like buying a subscription to the genealogy site Ancestory.com to help verify identities.
Trump and his representatives have repeatedly cited a 2012 Pew Center study that revealed 24 million voter registrations in the U.S. were not valid or "significantly inaccurate." That included 1.8 million dead people listed as eligible to vote.
The study's author David Becker, however, found no evidence of actual voter fraud.
He says voter registration lists have improved since the report was released. The U.S. Election Assistance Commission reported that nearly 14.8 million names were removed from voter rolls in 2014 for reasons such as death, felony convictions, having moved or failing to respond to confirmation notices.
"The lists are as good as they've ever been," Becker told The Associated Press.
Still, he encouraged election officials to eliminate ineligible registrations. If nothing else, he said, improved voter rolls help to improve confidence in the electoral system.
New York City is hardly alone in its push to root out ineligible voters.
Republican election officials in Florida and Colorado launched aggressive efforts to eliminate noncitizens and otherwise ineligible voters from their rolls before the 2012 election. But after warning that tens of thousands of noncitizens may have been registered, 141 cases were confirmed in Colorado and 207 in Florida.
"It is to everyone's benefit to have our rolls clean. But it's also to our benefit to make sure we're doing so in a way that doesn't disenfranchise eligible voters," said Myrna Perez, deputy director of the Brennan Center's Democracy program, who authored an extensive study of voter purges in 2008.
Leaving them in a messy state can also undermine confidence. New York Republican Party chairman Ed Cox is among those who are sure it could lead to fraud.
"I think they're perfectly happy to let some of these names just be on here so they can use them with respect to people voting who shouldn't vote," he told The Associated Press. "In an important election they will bring in buses of people from New Jersey and they will take them from poll place to poll place if we don't have good poll watchers and a good ballot security in place."
There is no evidence of Cox's claim.