Edith Guay was so excited to vote in her first presidential election since becoming a citizen that it didn’t make sense at first. But when she realized the mistake, she threw her mail-in ballot to the floor.

Montgomery County had mistakenly sent a Republican ballot to Guay, a registered Democrat, leaving her feeling frustrated and disenfranchised. County officials discovered this weekend that they sent 1,984 voters the wrong ballots for the June 2 primary, with Democrats receiving Republican ballots and vice versa.

“I was thrown off completely,” said Guay, 61, a French teacher who lives in Collegeville. “It was very emotional.”

It was apparently a computer error, said Lee Soltysiak, the county’s chief operating officer and clerk of its elections board. Pennsylvania is a “closed primary” state, meaning only registered Democrats can vote in Democratic primaries and only Republicans can participate in Republican ones.

When bewildered voters first started reaching out last week, Soltysiak said, county officials believed the error was relegated to just a few ballots. They started individually responding to voters, voiding their previous ballot and sending out correct ones. This weekend, the company that prints and mails Montgomery County’s ballots discovered that the issue was more widespread.

“We learned this weekend of the size of the [problem],” Soltysiak said, “which was both sobering but also good, to know exactly what the issue was, know who exactly was affected, and then we had a plan to get these ballots out.”

In short, the printer removed independent and third-party voters who can’t vote in this primary, but accidentally rearranged the remaining voters and parties in its system, mixing them up.

By retracing how it happened, the printer was able to identify the voters who received the wrong ballots. County officials on Tuesday were mailing them new ballots and a letter explaining what happened. The county has been working directly with the United States Postal Service, Soltysiak said, in an effort to get the new ballots delivered quickly. (Mail ballots must received by county elections officials by 8 p.m. on election day next Tuesday.)

It’s another black eye for Montgomery County, which sent tens of thousands of voters flawed instructions and has in some cases experienced long mail delivery times.

Pennsylvania counties have been struggling to run a smooth election this year, implementing a new election law and processing massive numbers of mail ballots while also preparing an in-person election in a pandemic.

This is the first election in which any Pennsylvania voter can vote by mail, and Philadelphia alone is handling more mail ballot requests this election than the entire state did in 2016. At the same time, counties are trying to figure out polling places and poll-worker staffing, and Montgomery County has reduced its number of polling places by 60%. It’s been a logistical nightmare, and county elections officials from across the state have warned that changes must be made to prevent much bigger problems in November.

Guay understands it was just an error — “a mistake can happen,” she said — and doesn’t necessarily blame anyone. But it’s shaken her confidence.

Guay became a U.S. citizen in 2018 after moving to the country in 1995 and was looking forward to casting her first presidential vote ever. Instead, she said, she felt robbed.

“When I gained the right, and I was sworn in, I was very proud of that," she said. "And then how could you do that to me? It’s more than just voting. … This is a democracy, for hopefully ever, and this is my right. And now I have it. I don’t want to give it up.”

She’s prepared to go to her polling place on Tuesday despite coronavirus fears. Otherwise she’s worried she’ll receive the wrong mail ballot again, or won’t get one at all.

Voters who request mail ballots can still vote in person using provisional ballots, which are counted only after county elections officials determine no mail ballots from them were received.

“I’m a bit suspicious that everything will be fine," Guay said.

Voter confidence is crucial to elections, and experts warn public trust can be fragile.

But there’s good news here, said Joshua A. Douglas, a University of Kentucky law professor who specializes in election law and voting rights: “The county caught its mistake and is doing something about it, so that should provide some assurance.”

Don’t let a mistake made during a pandemic stop you from exercising your rights, Douglas said.

“When we’re changing the election system so soon to an election, so drastically, things like this are just inevitable,” he said. “The fact they were transparent and they can identify every voter this happened to, that’s actually a good sign that they’re trying to do the right thing.”