As the recount of last month’s Democratic primary for Queens District Attorney continues, with candidates Queens Borough President Melinda Katz and public defender Tiffany Cabán currently separated by a mere 16 votes, attention has turned to 2,816 affidavit ballots that were cast in the election.

Election officials have invalidated more than 2,300 of the affidavit ballots on technicalities—such as not filling out the affiliated party section, individuals who voted but were not registered as Queens Democrats, or ballots filed at the incorrect polling station. Cabán campaign spokesperson Monica Klein told Politico that “hundreds of votes” were missed by scanners, and they remained confident of victory if every valid vote is counted. Katz’s attorney Frank Bolz called the Cabán campaign’s “cherry-picking” of affidavit ballots an “invasion of privacy.”

The Queens primary controversy has provided a rare window into a part of our electoral system that was only recently introduced to fix still earlier problems with contested votes. Affidavit, or provisional, ballots were introduced as part of the Help America Vote Act (HAVA), in 2002, as a fail-safe for eligible voters. If individuals seeking to vote found they’d been omitted from the voting list at the polling place, they would still be able to cast a vote; these ballots would be kept separate, and only counted once the voter was certified eligible to vote.

Despite affidavit ballots being a federal requirement, the U.S. government doesn’t specify a particular set of rules for validating them. That power is given to local election officials, and it varies from state to state.

Affidavit ballots can be invalidated for numerous reasons. If an individual is not registered to vote, or if certain fields are left incomplete, it will not be counted. According to the Wall Street Journal, the board invalidated close to 40 percent of the affidavit and absentee ballots in the Queens district attorney primary. About 114 ballots were invalidated for missing information, such as failure to write “Democratic” as the party voters were registered under.

According to Paul Gronke, a political science professor at Reed College who specializes in election behavior, it is the responsibility of local election officials to provide the correct information to affidavit voters.

“New York state does not have the strongest reputation on the election administration community,” Gronke told Gothamist. “I am not surprised to learn that many voters received bad directions—likely from poll workers due to inadequate training—about provisional voting.”

State rules are often arbitrary, and do not follow a nationwide pattern. Lonna Rae Atkeson, a professor at UNM and Director for the Center for the Study of Voting, Elections, and Democracy, said these rules are often “silly and ridiculous,” citing former Ohio Secretary of State Ken Blackwell’s proposal to validate affidavit ballots based on the weight of the paper they were filled out on.

“Sometimes administrators use crazy rules to disenfranchise people,” Atkeson told Gothamist. “The voter is in the file, or not in the file, with their name and address. I don’t see why they’d have to match whatever party identification on their registration. They can’t change that.”

Among the election reform laws passed in Albany this session, one bill pertained to affidavit ballots, noting that all affidavit ballots deemed “substantially” compliant should count. Though the legislation passed both the state senate and assembly, Governor Andrew Cuomo’s office has yet to receive the bill, and the governor declined to comment on it earlier this week.

Both Atkeson and Gronke reiterated that the only way to stop tight election races from ending up in lawsuits would be to create an independent panel of judges to settle election disputes. “But if the state or local jurisdiction has sloppy or inadequate regulations, it opens up the possibility of litigation,” said Gronke.

The Queens recount, a Board of Elections official said on Tuesday, is expected to last “a minimum of ten days, maybe two weeks.” The lawsuits could drag on for even longer.