In the days following the 2020 election, former President Donald Trump privately acknowledged his loss to Joe Biden before refusing to leave the White House and trying to overturn the results, according to a new book.

In the upcoming book, "Confidence Man: The Making of Donald Trump and the Breaking of America," New York Times reporter Maggie Haberman offers insight into the 45th president's post-election behavior.

In book excerpts obtained by CNN, Haberman claimed that Trump was initially aware that he lost to Biden following Election Day on Nov. 3, 2020.

"We did our best," the book quotes Trump telling junior press aides. "I thought we had it."

However, as days passed, Trump's stance began to shift. Haberman, who continues to cover Trump for the Times, wrote that Trump began telling aides he would stay in the White House and claimed the election was stolen.

"I'm just not going to leave," Trump told one aide.

He later expressed the same sentiments to another aide, saying, "We're never leaving. How can you leave when you won an election?"

At one point, Trump was overheard asking Republican National Committee Chairperson Ronna McDaniel, "Why should I leave if they stole it from me?"

Eventually, Trump began to publicly suggest widespread voter fraud and sought ways to overturn the results, including taking unsuccessful legal action in battleground states.

Publicly, Trump dismissed speculation that he didn't plan on leaving the White House.

On Nov. 26, 2020, a reporter asked Trump whether he would vacate the White House if the Electoral College voted in favor of Biden. "Certainly, I will, and you know that," Trump replied.

Trump lost 306-232 to Biden in the Electoral College and lost by more than 7 million votes in the general election.

Trump's son-in-law Jared Kushner reportedly advised aides of the former president to confront Trump about the loss but he opted out of joining them.

Kushner compared the situation to a deathbed scene. "The priest comes later," Kushner said.

"Confidence Man: The Making of Donald Trump and the Breaking of America" is expected to be released on Oct. 4.

Former U.S. president Donald Trump rally in Wilkes-Barre