When Philadelphia officials gathered for an Election Day planning session in the city’s Emergency Operations Center last month, they gamed out a range of concerning scenarios.

One stood out the most.

What if in-person votes suggest President Donald Trump is winning Pennsylvania after the polls close, but the slow counting of mail ballots in Philadelphia flips the tally in favor of Democratic nominee Joe Biden in the days after? And what happens if Trump then wrongly claims the election is being stolen from him and calls on supporters to storm elections offices?

“This is the scenario that scared people the most,” said one participant in the planning session, who like two others present would discuss it only on condition of anonymity so they could describe a process that wasn’t open to public participation.

Their fear isn’t unfounded.

Trump has for months falsely assailed mail ballots as being vulnerable to widespread fraud, leading his voters to shun them. Requests for mail ballots in Pennsylvania show Democrats using them in far greater numbers than Republicans. They take longer to count than votes cast on polling-place machines, meaning early returns will disproportionately count Trump voters — a phenomenon Democrats have branded the “red mirage,” though it’s known academically as the “blue shift.” And while election officials can’t legally start counting mail ballots in Pennsylvania until the polls open on Election Day, Trump has made clear he wants the results known by that night.

It’s a recipe for chaos.

Dozens of officials talked through how to handle this scenario and others over the course of four hours in the EOC, in the basement of the Fire Administration Building, where long banks of large video screens stand in front of clusters of work stations. It’s a place where the city deals with everything from the coronavirus pandemic to crowd control after an Eagles Super Bowl victory — and now, potential postelection unrest.

Officials from the City Commissioners — who run elections — police, fire, the Office of Emergency Management, and other agencies, along with staffers from the Pennsylvania Emergency Management Agency, left with plans they hope they’ll never need. Their meeting took place before Trump put Philadelphia on the front lines of his attack on voting by declaring in a nationally televised debate that “bad things happen” in the city’s elections.

The participants worked through how to handle civil unrest at polling places. And officials even considered how to respond to a cyberattack that publishes fake results online.

“I’m more concerned about the disinformation and misinformation about fraud than I am about the possibility and reality of fraud,” said David Thornburgh, head of the nonpartisan, good-government group Committee of Seventy, who did not attend the planning session. “It’s very destabilizing. It causes an unnecessary and even dangerous lack of confidence in our local election systems. It encourages people to question something that is foundational to our democracy.”

Officials last week vowed to guard against any voter suppression efforts, with District Attorney Larry Krasner warning that bad actors would “find themselves in a jail cell," and state Attorney General Josh Shapiro condemning "the lies and the misinformation coming from the president of the United States.”

But Trump’s campaign continued its long-running legal fight over the election’s rules, as well as its efforts to sow doubt about its very legitimacy. “The Democrats are busy changing the way ballots are cast and counted in order to create chaos and confusion,” the campaign said in one email to supporters seeking volunteers to monitor polling places. "Their goal is to steal this election from the American people.”

Trump spokesperson Thea McDonald said Wednesday that the “campaign will forge ahead with our challenges against the problems of Pennsylvania Democrats' radical vote-by-mail system.” (Pennsylvania’s mail voting law was passed by the Republican-controlled legislature last year.)

Sinceré Harris, a senior adviser to the Biden campaign in Pennsylvania, accused the Trump campaign of trying to suppress voting.

“When folks interfere — the folks who want to harass people or harass election officials or gum up the system, create chaos, create confusion — it’s because they don’t want mail balloting to work,” Harris said in an interview. “They don’t want it to be effective.”

At the heart of what elections officials fear could lead to chaos is Trump’s call for his supporters to “go into the polls and watch very carefully.” Late last month, the campaign sent uncertified monitors to new satellite elections offices where state law doesn’t give them the right to be. They weren’t allowed in, prompting Trump’s now-famous comment that “bad things happen in Philadelphia." A Philadelphia judge on Friday and a federal judge in Pittsburgh on Saturday both rejected Trump campaign lawsuits related to poll watchers.

Trump’s campaign is recruiting Election Day volunteers across the country, dubbed “Army for Trump” on his website. The campaign says it already has more than 50,000 volunteer observers across key battleground states, including Pennsylvania. It produced a training video for Pennsylvania volunteers hoping to become certified poll watchers, with by-the-books instructions adhering closely to state law on what officially sanctioned election monitors can and can’t do.

Poll watchers allow campaigns and parties to challenge votes they believe are illegitimate, such as if a voter doesn’t live in the precinct. Those challenges are supposed to be made in good faith and with reason, and it is illegal to challenge voters on the basis of factors such as race, appearance, or national origin. Voter intimidation is also illegal. The chief poll worker at each location is responsible for handling infractions, which can result in removing the monitors or calling law enforcement.

Early mail voting outside City Hall in Philadelphia on Thursday.
Astrid Rodrigues / Staff
Early mail voting outside City Hall in Philadelphia on Thursday.

But officials fear the greatest potential source of Election Day conflict is not official poll watchers, but other Trump supporters who show up outside polling places. They may come from outside the city, where Democrats outnumber Republicans by 7-1.

“We have to be concerned about people who could be rogue poll watchers and might come from areas of Pennsylvania with high numbers of white nationalist groups and militias,” said State Rep. Kevin Boyle, a Northeast Philadelphia Democrat and the ranking member of the House State Government Committee, which has jurisdiction over election laws. “I’m still concerned there could be a broader effort to try to intimidate voters, most particularly voters of color, in the city of Philadelphia.”

While supporters of both parties have long stood outside Philadelphia polling places to hand arriving voters sample ballots — fliers with the party’s slate of recommended candidates — Democrats fear the president’s rhetoric will make the encounters more volatile. It’s illegal to engage in electioneering — posting signs, distributing fliers, or asking for votes — within 10 feet of a polling place entrance.

During rallies in rural and Republican-friendly parts of Pennsylvania four years ago, Trump baselessly accused Democrats of trying to “rig the election” and urged supporters to travel to cities like Philadelphia to serve as poll watchers.

But state law requires voters to be registered in the county where they will serve as poll watcher. Trump’s campaign, in a federal lawsuit in Pittsburgh, is trying to change that. A federal judged rejected a similar Trump lawsuit just before the 2016 election.

His rhetoric hasn’t changed after four years in the White House. Asked during the debate if he would urge his supporters to remain calm during a period before the winner is known, Trump said instead: “I’m urging my supporters to go into the polls and watch very carefully because that’s what has to happen. I am urging them to do it.”

Mayor Jim Kenney said the president is singling out Philadelphia to “create the specter of fear and danger.” Legal mechanisms for combating fraud are handled by election workers and certified poll watchers, Kenney said, and not “Proud Boy vigilantes who keep people from entering.”

“He’s like a cornered rat. He’s flailing,” Kenney said in an interview earlier this month. “If they come to Philadelphia on Election Day, the polls will be secure.”

Conflagrations might not be limited to Philadelphia. Haverford Township Republican Party chairman Jim Knapp last month sent a letter to GOP activists imploring them to volunteer on Election Day to pass out literature outside the polls or observe election workers inside.

“Many concerned Republicans have been asking me what they can do to prevent voter fraud and election-day mistakes at the polls,” Knapp wrote. “Having a strong, visible presence at the polls (inside AND outside) is the #1 way we can prevent fraud, misinformation, and mistakes.”

In an interview, Knapp said he knew of no voter fraud in Haverford, but sent the email after hearing from people concerned about it. “Do I think the Democratic Party is participating in fraud? No, I don’t,” Knapp said. “My email was really an effort to say, ‘Hey, if you’re really concerned, step up.’”

And it’s not just Pennsylvania: The FBI is taking the politically charged climate into account in its plans to keep polling places safe, the Associated Press reported.

The potential chaos keeping Democrats and elections officials awake at night doesn’t end when polls close. Worries about postelection upheaval crystallized in the state after a September article in the Atlantic, which raised the prospect that the Pennsylvania legislature, facing a prolonged vote count, could appoint its own Trump-friendly electors to the Electoral College — regardless of who wins the state.

Pennsylvania GOP chairman Lawrence Tabas told the magazine that doing so is “one of the available legal options set forth in the Constitution.” State Sen. Jake Corman, the Republican majority leader, said: “We don’t want to go down that road, but we understand where the law takes us, and we’ll follow the law.”

Both later said their comments had been taken out of context or misinterpreted.

But what concerns officials the most is how Trump might exploit a delay in counting mail ballots. In a seven-page memo to Tabas in June, Matt Wolfe, a Republican lawyer and ward leader from West Philadelphia, recounted in detail his experience observing mail-ballot tabulations with a Trump campaign official after the June primary. In the memo, obtained by The Inquirer and first reported by the Atlantic, he described a series of ways in which the party could challenge results and rulings by election officials reviewing ballots.

“If we are to have any impact on the integrity of the mail-in and absentee ballots," Wolfe wrote, "we need to have a team in place to monitor that process.”

Wolfe downplayed his memo and said the state party and the Trump campaign didn’t follow much of his advice.

“I thought it was a very reasonable thing,” he said. “Nobody paid attention to it.”

-Staff writers Laura McCrystal and Sean Collins Walsh contributed to this article