On the night of Pennsylvania's June 2 primary, things looked bleak for Nina Ahmad.
The former deputy mayor of Philadelphia was running in a crowded Democratic primary field to become the state's auditor general in a race that could be a preview of things to come across the country in November.
If Ahmad won, she'd become the first woman of color to be nominated for an executive leadership position in the state.
But she trailed in the race by tens of thousands of votes on election night. Supporters began reaching out with sympathy.
"People were worried; they emailed [about how I lost] and said I'm so sorry," Ahmad said. "I said, 'Just hold your horses.' "
The election night results mostly reflected the totals from the western part of the state. But Ahmad's base was in the east, in vote-rich Philadelphia, which was still counting votes.
It was a full week after election day, a week that involved her and her daughters refreshing results' websites "every two minutes," before she took the lead. She declared victory officially Thursday, nine days after election day.
More than half of all ballots cast in the Pennsylvania primary were by mail, and as states across the country transition to the historic amount of mail voting happening as a result of the pandemic, similar stories are playing out in other primaries.
Experts and election officials are already sounding the alarm that voters need to expect the same sort of delay in November's presidential election.
"We really need to get into a mindset that we will not know who the winner of the election is on election night," said Nathaniel Persily, an election law professor at Stanford University.
The biggest reason for the delays is that mail ballots take longer to process than in-person votes.
Officials need to verify signatures, open envelopes and, in many states, including Pennsylvania, much of that process can't begin until the day of the election, due to state law.
None of that is inherently a problem — it doesn't mean anything is wrong with the tabulation or the accuracy of the count. If anything, it's an indicator that election officials are working through the sort of safeguards that prevent fraud or errors.
But problems arise because voters don't understand that, Persily said. And then these sorts of delays can become fertile ground for conspiracy theories.
"In some ways, this is the worst year to have a pandemic that affects election administration because we were already worrying about disinformation and loss of confidence," Persily said. "And so now we have the additional challenge to voter confidence that's posed by the possibility that all kinds of votes are going to be counted after Election Day."
This scenario has already played out multiple times in the past two years.
When the Iowa caucus app famously malfunctioned in February leading to a delay in results, theories flooded the Internet about whether it was an inside job by one of the campaigns.
And in recent general elections, such as in California, Florida and Arizona during the midterms, Republicans, including President Trump, questioned the legitimacy of votes counted after Election Day because they skewed more toward Democrats.
"I will not sit idly by while unethical liberals try to steal this election from the great people of Florida," said now-Sen. Rick Scott, R-Fla., as his race tightened in the days after the election as mail ballots continued to be processed.
On the contrary, the reason ballots counted after Election Day often tilt in favor of Democrats is because they are usually being processed in densely populated urban voting jurisdictions, where more Democrats are usually clustered (such as South Florida or Philadelphia).
Many voting rights advocates, including Debra Cleaver, who founded the nonprofit voter outreach organization VoteAmerica, said they are worried about what Trump will say if the same thing happens later this year.
"Given who is currently in the White House, that is going to lead to some wild accusations," Cleaver said. "Twitter is gonna be on fire."
The irony is that the delay in results come from the precautions election officials take to prevent the issues with mail ballots about which Trump often worries openly.
"One of the reasons that the results take longer is [officials are] being diligent," Cleaver said. "That's actually what we should be pushing for as a country. So we should celebrate the fact that we're actually counting every vote."
In Pennsylvania, the problem could be alleviated somewhat with a rule change.
Secretary of State Kathy Boockvar is lobbying the Legislature to pass a law that would allow local election officials to begin opening mail ballots before Election Day to prepare them to be scanned, as is allowed in most states that process a large number of mail ballots.
"Even if you didn't start counting until Election Day, you could do so much of the process weeks before," Boockvar said.
Regardless, she said the reason conspiracy theories around results "have legs" is because there's been a failure by election officials, candidates and journalists to set voter expectations properly.
"There's the headlines that say this is a disaster if there's a delay, and that's not right," she said. "If we all anticipate that accurate vote counts, with a higher volume by mail, or for any reason, for a pandemic or for civil unrest, take longer because it takes longer to make sure the count is accurate, then that's the opposite of a disaster.
"That's what every single voter and official should want for this country."
Ahmad, for one, is at peace with the delay. "Patience is a virtue, my mother told me. And I am finding that to be true emotionally," she said. "What I'm learning is you have to trust the process."