Hillary Clinton reportedly apologised to Barack Obama on election night after the president called her to tell her to concede to Donald Trump.
A new book detailing the dramatic final hours of the Clinton campaign describes how "Obama’s legacy and her dreams of the presidency lay shattered at Donald Trump’s feet".
The Clinton campaign had been confident of victory on the day: almost every poll leading up to the election had the Democrat heading for the White House.
However, the first troubling signs came as early as 7.45pm, when Steve Schale, a Clinton campaign polling analyst, called the Peninsula Hotel in New York - where the Clinton inner circle were huddling - to warn they were going to "come up short" in the key swing state of Florida.
It became clear that Mr Trump was on course for victory when he took Wisconsin at around 11pm Eastern Time.
According to a Washington Post review of the book, Shattered: Inside Hillary Clinton’s Doomed Election Campaign, David Simas, the White House political director, called Robby Mook, Mrs Clinton’s campaign manager, to advise that Mr Obama "doesn’t think it’s wise to drag this out".
As a Trump victory became beyond doubt, Mr Obama then called Mrs Clinton himself, telling her: "You need to concede.”
She replied: "Mr President, I'm sorry."
This second call from the White House "crystalised everything for Hillary", reporters Jonathan Allen and Amie Parnes write in the book released on Tuesday.
As Mr Obama gave his advice, the book states, Mrs Clinton "winces": "She wasn’t ready for this conversation. When she’d spoken with Obama just a little bit earlier the outcome of the election wasn’t final yet.
"Now, though, with the president placing a consolation call, the reality and dimensions of her defeat hit her all at once.
"She had let him down. She had let herself down. She had let her party down. And she had let her country down.
"Obama’s legacy and her dreams of the Presidency lay shattered at Donald Trump’s feet. This was on her. Reluctantly she rose from her seat and took the phone."
Mrs Clinton then called Mr Trump, stating the two words that had seemed unthinkable to her supporters: "Congratulations Donald."
"I’ll be supportive of the country’s success and that means your success as president," she reportedly said.
The book adds colour to what was already one of the most dramatic US election nights in recent history.
The Clinton campaign initially did not concede to Mr Trump, despite multiple US news networks calling the election for the Republican.
Mrs Clinton did not appear at her election night party, held at the Javits Center, just one mile away from Mr Trump's own event at Trump Tower in Manhattan.
Instead, John Podesta, Mrs Clinton's campaign chairman, took the stage to tell thousands of supporters the result was "still too close to call" and that Mrs Clinton was "not done yet".
According to Kellyanne Conway, Mr Trump's campaign manager, Mrs Clinton called Mr Trump at around 2.30am the following morning to concede.
The then president-elect apparently told his Democrat opponent, who he had labelled a "nasty woman" during one of their debates: "You’re a smart, tough lady and you ran a great campaign. Thank you for calling. I respect you.”
Mr Obama called his former secretary of state to console her and express his "admiration for the strong campaign she waged throughout the country”, the White House said at the time.
He later said he "could not be prouder” of Mrs Clinton.