An unparalleled four-year battle over Donald Trump’s shock election and disruptive presidency raced to a suspenseful conclusion this weekend, as the candidates blitzed an expanded 14-state battlefield with ads and rallies that presented radically divergent visions for the nation.

Democrats at all levels remained privately terrified of another surprise result, despite far greater confidence in polling that pointed to a victory for former vice president Joe Biden. Republicans put their faith, once again, in the president’s showmanship as he mounted a final series of irreverent rally spectacles in violation of public health guidance, hoping to motivate a massive late surge of turnout.

Four years ago, Trump broke through traditionally Democratic states along the Great Lakes to upend the electoral college map and preside over a Republican majority in Congress, leaving his opposition with little formal power. Election Day 2020 arrives Tuesday with Democrats comfortably in control of the House, threatening to retake the majority in the Senate and within striking distance of beating Trump in several Southern states once viewed as an unbreakable part of his reelection path.

Little else has proceeded according to the script of elections past. As the candidates made their closing arguments, the coronavirus pandemic, which has cost the nation more than 230,000 lives and forced nearly 20 million to lose work, reached a new peak in infection rates, threatening yet another blow to lives and livelihoods of voters, as other nations around the world announced new shutdowns.

On television, the Biden campaign had a nearly 3 to 1 advantage in advertising that included five states where they were on air unopposed, according to Advertising Analytics. Early-vote totals across the country broke records, as states such as Texas exceeded all the votes cast in 2016 days before Election Day. A fear of post-election violence and looting led property owners nationwide to board up storefronts.

Large teams of partisan lawyers prepared to litigate ballot counts should races end up close, their eyes on a series of court rulings concerning deadlines for mail-in ballots and other legal questions that could spark a drawn-out courtroom drama in the days and weeks after the voting ends.

The two candidates’ contrasting approaches to viral danger provided the starkest choice for the country, as the president mocked mask-wearing at his events and pushed falsehoods such as the contention that the country was “turning the corner” on the coronavirus. He blamed Democratic governors for throttling the economy by following the guidance of public health leaders, even though experts say imposing restrictions will ultimately allow the economy to recover more quickly.

“I just want normal life,” Trump said Friday at a rally in Wisconsin, a state gripped by epidemic spread. “You do, too.”

Biden, by contrast, called for a new national effort to fight the pandemic with mask mandates and warned of a deadly winter if Trump is reelected, echoing the concern of the nation’s top infectious-disease expert, Anthony S. Fauci, who has criticized Trump’s events. Biden’s campaign has refused to plan mass rallies, choosing socially distanced events, with supporters honking their approval from cars instead of applause.

“This isn’t a political statement of us wearing these masks. For God’s sake, it’s a patriotic duty,” Biden said in Wisconsin hours after Trump, while speaking through a surgical mask. “I’m not going to shut down the economy. I’m going to shut down the virus.”

Republican advisers argued that the president’s denial of medical reality would have a positive effect, by projecting optimism.

“If you’re just tuning into this campaign, you see one candidate cheerfully entertaining an adoring crowd of thousands three times a day, while the other is yelling at parked cars,” Republican strategist Josh Holmes said of the advantage Trump hoped to achieve. “You’d be forgiven if you assumed Trump was about to win in a landslide.”

Inside the Trump campaign, advisers admitted they still trailed in polls, skeptical of their chances of winning Michigan. But they think they have better shots in Wisconsin and Pennsylvania, and are confident about Florida and North Carolina. Arizona is close to even, two Trump campaign officials said, taking a more optimistic tone than the public polling.

The Biden campaign has been focused on getting mail-in ballots returned and turning out less frequent voters, a younger and more diverse crowd, on Election Day. The fact that so many Democratic ballots have already been returned has helped narrow the targets they know they need to get to the polls.

“This is exactly what we expected in a lot of ways. We have tremendous early-vote enthusiasm,” said Jenn Ridder, national states director of the Biden campaign. “The race is competitive and we expect it to narrow in the last few days.”

While Biden offered a broad message about restoring American values to national leadership, Trump’s final message, with rants against the media, crowd chants calling for Biden’s imprisonment, and conspiracy theories, focused less on persuasion than on turning out Trump’s base, along with similar voters who sat out 2016 but have been targeted and in some cases registered to vote by a large Republican field operation. They are also counting on Democratic turnout to disappoint on Election Day, particularly among Black and Hispanic voters.

“Many observers are missing what a gamble it is for the Biden message to be 10 percent pro-Biden, 90 percent anti-Trump,” Trump 2016 campaign manager Kellyanne Conway said. “It’s mystifying that Biden has become increasingly negative and even Obama has traded in ‘hope and change’ for ‘harangue and complain.’ ”

Some Democrats expressed concern over early-vote turnout in some parts of the country, but both the Biden campaign and outside groups remained confident that the numbers were holding for a Biden victory. They also continued to predict that Trump’s decision to ignore health warnings at his rallies would backfire, given polling that shows continued high levels of concern about the pandemic.

“We are on the lookout for a surge of mysterious previously unnoticed Trump voters and we keep on not seeing it,” Wisconsin Democratic Party Chairman Ben Wikler said.

Public polling averages showed a very different race than in 2016, when Trump had benefited from a late surge that was recorded in public polling.

Over the past two weeks, by contrast, Biden’s lead has held steady in Michigan, widened by a point in Wisconsin while falling by two points in the national average and Pennsylvania and one point in North Carolina, according to averages of public polls.

The shifts toward Trump so far, where they have occurred, are smaller than his 2016 gains over the same period and still leave Biden with a considerably larger lead going into Election Day. Biden now leads by nine points nationally, according to a Washington Post average of polls, compared with three to four points for 2016 Democratic nominee Hillary Clinton. Biden’s standing in Florida, Wisconsin and Pennsylvania is roughly two points larger than Clinton’s lead over Trump at the same point, depending on how polls are combined.

Several Democratic strategists, who were privately polling in the final weeks, said they had detected no significant shift toward Trump. They also argued that the election environment was far from that which began around the same time then-FBI Director James B. Comey announced the discovery of Clinton emails on a laptop owned by her aide’s husband.

“We spent the last two weeks of 2016 focused on Hillary Clinton and the FBI announcement, and from that point forward the race was closing day over day. That is not the case now,” said Guy Cecil, chairman of Priorities USA, the largest Democratic super PAC supporting Biden. “The focus of this race has been covid and the president’s handling of covid. That has been true for several weeks.”

Demographic breakdowns of public national polls also showed a rather stable race, with clear advantages for Biden. The Democrat has been leading voters over age 65 by nine points, in a Washington Post average, a shift of 17 points from 2016, when Trump carried the group. Trump’s margin among White men has dropped 15 points and his support among White women has fallen by 10 points.

By contrast, the president has gained sizable strength among Hispanic voters since 2016, according to the same polls, and at least maintained his support, albeit small, among Black voters.

“If he wins this thing, you know who he is going to owe his victory to?” asked one Trump campaign adviser, who spoke on the condition of anonymity to speak more frankly. “African American men and Hispanics. The trick is where are these independent suburban women.”

Republicans have been particularly cheered by the early-vote numbers in Miami-Dade County, a Democratic stronghold, which they believe show a strong Hispanic vote for Trump. Democratic strategists also have raised alarms in recent days at the early turnout among their targeted Black and Latino voters in the state.

“Democrats are underperforming their turnout,” said Ryan Tyson, a voter data consultant in the state who has worked with Republicans.

Tyson nonetheless said that it was too soon to tell from the vote count who would win Florida, which he predicted would come down to 50,000 to 80,000 votes.

“Anybody who thinks they can read the tea leaves is fooling themselves,” he said.

Strategists for both parties say Georgia may be more likely to go Democratic this cycle than Florida, which would mark a dramatic shift from the typical electoral college map. The state, which features two U.S. Senate races, has been trending toward Biden in recent weeks on the strength of strong African American turnout, large Democratic registration efforts and lingering frustration over the 2018 gubernatorial election, which Republicans won narrowly.

Consultants for Hawkfish, a Democratic data firm funded by former New York mayor Mike Bloomberg, produced an analysis Saturday that argued that the remaining path for a Trump victory was a collapse in vote-by-mail returns from Democrats in the final days.

“This comes down to Democratic turnout at this point,” said Michael Halle, a Hawkfish consultant who previously worked for former South Bend, Ind., mayor Pete Buttigieg.

Republicans agreed. Trump campaign manager Bill Stepien has argued that Republicans will vote en masse in person on Tuesday, while he has said that Democrats have scared their voters from turning out with warnings of the potential health risks of voting in person during a pandemic.

Trump’s closing argument over the past week has been woven with false and inflammatory claims. He boasted of having passed the biggest tax cut in history, even though it is smaller as a share of the economy than a 1981 cut. He said Democratic governors still had their states shut down, when they did not, and that Mexico was paying for the border wall that is being built with U.S. taxpayer funds.

He also has joked that Biden’s running mate, Sen. Kamala D. Harris (D-Calif.), could not pronounce her own name, and said that Rep. Ilhan Omar (D-Minn), an African American Muslim woman, “does not love our country.” He claimed repeatedly that Biden wants to shut down the country, which Biden has said he does not plan to do.

“No Thanksgivings, no Christmas, no Fourth of July,” Trump said.

Biden has answered with events by former president Barack Obama, who has taken on Biden’s 2012 reelection role, as an attack dog, mocking Trump for having a smaller inauguration crowd, among other things.

“Remember when Republicans were saying, ‘Let Detroit go bankrupt,’ ” Obama jibed at a Saturday rally in Flint, Mich., reviving a talking point from the 2012 campaign. “Now they might as well be saying, ‘Let America get covid.’ ”

With just days to go, neither campaign expressed certainty of the result, in sharp contrast with 2016, when Democrats entered Election Day with high confidence.

“The difference is four years ago they didn’t think we could win,” Trump pollster John McLaughlin said. “This time they are afraid we can win.”

Scott Clement contributed to this report.