President Trump vowed on Friday to continue to fight the election results, privately urging allies and advisers to defend him publicly and insisting that he still had a path to victory over former vice president Joe Biden.

But behind the scenes over the past two days, advisers have broached with the president the prospect of an electoral defeat, and how he should handle such an outcome, two people familiar with the discussions said.

Some close to the president are advocating that, if Biden is declared the winner of the presidential election, Trump will ultimately offer public remarks in which he commits to a peaceful transition of power, according to allies and Republican officials, who like others on Friday spoke on the condition of anonymity to describe internal discussions. One senior campaign aide, however, said there had been no discussion of a concession speech.

Trump is unlikely to ever concede in the traditional sense, allies said — giving the sort of gracious, magnanimous speech the nation has come to expect at the end of even the most hard-fought presidential contests. If he loses, these people added, they expect Trump to continue to baselessly claim, as he has done for several days now, that the election was stolen.

Since Election Day, the president has acknowledged to some advisers that he faces an uphill battle but has argued it is still a battle worth having.

Still, some in Trump’s orbit have worked to calm the president and help push him toward what many privately acknowledge is an increasingly likely outcome: the loss of the White House, for a man who has made clear he detests losing almost above all else.

After an angry appearance in the White House briefing room Thursday evening in which he called into question the legitimacy of the election results, aides persuaded the president on Friday to release a more measured statement about the unfolding vote counting and to refrain from any public appearances.

The statement issued through his campaign called for “full transparency into all vote counting and election certification,” saying that the fight was “no longer about any single election.”

“I will never give up fighting for you and our nation,” the president concluded.

A person close to the campaign described the statement as “a baby step away from defiance and toward a possible loss.”

Trump has spent the week talking to a coterie of longtime advisers and allies, several officials said, including Kellyanne Conway, his former counselor who left the White House at the end of August; Rudolph W. Giuliani, his personal attorney; Jared Kushner, his son-in-law and senior adviser; Vice President Pence; Republican National Committee chairwoman Ronna McDaniel; White House Chief of Staff Mark Meadows; former chief of staff Reince Priebus; and his campaign team.

His allies are still divided into two main factions — one group, led by the president and his family, that still believes he has a path to victory and that he should continue to battle; and another, larger group of advisers and Republican officials who believe the presidency has all but slipped away.

Yet even those who now believe a Biden victory is a foregone conclusion have struggled with how to break the news to Trump. “They know he’s lost, but no one seems willing to tell King Lear or Mad King George that they’ve lost the empire,” said one Republican in frequent touch with the White House.

And so Trump spent much of the day Friday in the Oval Office, watching election updates on cable news and calling allies and advisers to implore them to “fight and defend me,” said someone familiar with the conversations.

Since Election Day, the president has called Senate Majority Leader Mitch McConnell (R-Ky.) several times, but has been remarkably calm, simply updating the Republican leader on the election results and explaining why he thinks he can still win, according to a different person familiar with the conversations.

Meadows, meanwhile, has repeatedly told Trump that there remains a path to victory in the critical state of Pennsylvania, a claim echoed by campaign manager Bill Stepien.

Kushner on Thursday and Friday called allies to explain that the campaign had legal teams deployed to each of the contested states, how they viewed the results so far and what the path to victory was. But one person who spoke to Kushner described him as “compartmentalized” and “businesslike,” seeming to understand that the Trump campaign might still come up short.

One ally who spoke to the president on Thursday said that Trump’s adult children seemed angrier at the prospect of a loss than Trump himself. That same day, Trump’s two oldest sons, Donald Trump Jr. and Eric, took to Twitter to excoriate Republicans for not doing more to publicly defend and fight for their father. And after the president’s family demanded action, the campaign set up a hotline for people to call to report allegations of voter fraud.

The campaign also tapped David Bossie, a Trump adviser who is not a lawyer, to lead the team’s legal effort to contest the results in several key states. Bossie did not respond to requests for comment. With recriminations and finger-pointing already beginning, however, some advisers griped that the president’s team — and Kushner in particular — should have had more of a legal strategy prepared.

Advisers said the legal strategy so far seemed to be more about public relations and politics. Advisers were split on whether the strategy was serious and long-term or only intended to kill a few days until the president “gets in a better head space and moves on,” in the words of one leading Trump adviser.

Aides were focused heavily on Pennsylvania and Arizona, multiple officials said, and Trump was complaining to others about being behind in Georgia, which he believed was firmly in his camp, the adviser said.

On Thursday, Trump Jr. visited the Georgia Republican Party headquarters in Atlanta, rallying the “Make America Great Again” faithful to remain hopeful. “Everyone knows it — Donald Trump is a fighter,” Trump Jr. said. “And we’re going to fight each and every one of these. Georgia, it’s going to be important.”

On Friday, McDaniel appeared on Fox News to underscore the president’s concerns — “We have seen a lot of irregularities,” she said — before flying to Georgia, which is headed for a recount.

Other top White House officials tried to support Trump publicly while also projecting a sense of normalcy and reassuring the public that, ultimately, the administration would accept the final election results. Advisers to the vice president — who has not spoken publicly since election night — were attempting to make sure Pence seemed supportive of Trump’s efforts while avoiding being too aggressive.

“I Stand With President ­@realDonaldTrump,” Pence tweeted Thursday. “We must count every LEGAL vote.”

Senior economic adviser Larry Kudlow, speaking on CNBC on Friday, said he expected “a peaceful transfer of power.”

“This is a great country,” Kudlow said. “This is the greatest democracy in the world, and we abide by the rule of law, and so will this president.”

Some advisers have also been talking about how to spin a possible loss, arguing that Trump could still take a victory lap — taking solace in the fact that, even in a deadly pandemic, he exceeded expectations, probably helped the Senate hold its Republican majority and gained Republican seats in the House.

This is not a referendum on you, they have told the president.

Pence hinted at that theme in another tweet Thursday, writing that he had talked to more than 20 Republican lawmakers to congratulate them “on their Historic wins by huge margins across the Country,” which he implied wouldn’t have been possible without the help of the president.

“Thanks to President @realDonaldTrump, we have strong Conservatives fighting for the American people in Washington,” Pence tweeted.

Despite the uncertainty, most in Trump’s orbit said they think it is highly unlikely that, if he does lose, Trump will simply refuse to the leave the White House, as many Democrats have feared. One ally dismissed the concern as “a liberal fever dream.”

Instead, they feel confident Trump will ultimately vacate the White House without ever explicitly conceding defeat.

One Republican close to the campaign chuckled as they imagined a possible future, six months from now: Biden as president, with Trump still griping, “They stole it from me.”

Jacqueline Alemany contributed to this report.