A new, behind-the-scenes book explores Hillary Clinton's 2016 campaign and the excruciating play-by-play of her election night

For Hillary Clinton, the harsh reality of her election-night loss to Donald Trump did not truly take hold until she received two phone calls from her former boss, then-President Barack Obama: one urging her to concede swiftly and graciously to the rival she loathed, and then, finally, one of consolation.

This is according to a new, behind-the-scenes book, Shattered: Inside Hillary Clinton’s Doomed Campaign, by political journalists Jonathan Allen and Amie Parnes.

Get push notifications with news, features and more.

The book, out Tuesday, explores Clinton’s 2016 campaign and the excruciating play-by-play of her election night.

At one point, the authors describe how, in the early hours of Nov. 9 — not long after the Associated Press officially called the race for Trump, and hours after most of the Clinton camp had all but given up hope of winning — the 2016 Democratic nominee got a call from President Obama.

“You need to concede,” Obama told his former secretary of state, according to the authors.

The president, who had hit the campaign trail hard for Clinton, now believed the race was over and was determined that she accept her defeat with “dignity.”

“After Trump had questioned the legitimacy of the election, the last thing Obama wanted was for Hillary to reinforce that message. As president, it was his job to safeguard the integrity of the political process,” the authors write.

Though she faced pressure from some top advisors to stay in the race, Clinton’s mind was made up after her call with Obama, the authors say.

“Give me the phone, I’m calling him,” she instructed her aides. After finally connecting with Trump on the phone, Clinton “uttered two words she’d never expected to hear in her own voice: ‘Congratulations, Donald.’ ”

RELATED VIDEO: Watch: Natasha Stoynoff Breaks Silence, Accuses Donald Trump of Sexual Attack

Not long after the concession call, Obama reached out to Clinton again, the book says. By then, the outcome of the election was final and now, “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 the dreams of her presidency lay shattered at Donald Trump’s feet. This was on her.

“Mr. President,” she said softly after taking the phone. “I’m sorry.”

According to the authors, if Clinton carried the blame on her own shoulders that night, it didn’t take long, in the aftermath of her loss, for her to unload it on those around her — including Obama.

The authors claim she blamed everyone from the FBI to the KKK to the KGB for her unexpected defeat.

“The Russian stuff has bothered her a lot,” one of her top aides reportedly told the authors. “She’s sort of learning what the administration knew and when they knew it, and she’s just sort of quizzical about the whole thing.”

FROM COINAGE: This Is How Much It Would Cost to Paint the White House (And More Crazy Facts)

“She struggled with the question of why Obama hadn’t done more to apprise the public that the Russians had gone way beyond what had been reported [in influencing the presidential election],” the authors continue. “She wondered why the president hadn’t leaned harder into making the case that Vladimir Putin was specifically targeting her and trying to throw the election to Trump.”

“I’m angry,” Clinton reportedly told a friend a couple days after the election.