Hillary Clinton phoned Barack Obama on election night after conceding defeat and told him: ‘I’m sorry’.

The Democratic Presidential candidate stepped into an anteroom to apologize for losing to Donald Trump in a conversation which has never previously been reported.

As she took the call Clinton knew she had ‘let her country down’ and that Obama’s legacy lay ‘shattered at Donald Trump’s feet’, a new book reveals.

Minutes earlier Clinton had called Trump and suppressed ‘the anger that touched every nerve in her body’ as she conceded.

She said: ‘Congratulations, Donald. ‘I’ll be supportive of the country’s success and that means your success as president.’

The drama of Clinton’s election in the Peninsula Hotel in Manhattan is detailed in Shattered: Inside Hillary Clinton’s Doomed Election Campaign.

In Shattered: Inside Hillary Clinton's Doomed Campaign political journalists Jonathan Allen and Amie Parnes tell how Clinton’s confidence at her victory was replaced by anxiety and resignation. In his first call to her on election night, President Obama urged her to concede

In a second call from Obama, Hillary knew 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,' write the authors

Political journalists Jonathan Allen and Amie Parnes tell the hour by hour drama of how Clinton’s confidence at her victory was replaced by anxiety and resignation as Trump won the biggest upset in modern political history on November 9 last year.

The book says that as the results rolled in for states like Pennsylvania, the clear tipping point for the race for the White House, Obama called Clinton and said: ‘You need to concede’

According to the book, Obama was ‘determined to make sure that his friend understood that the election was over’ and that she had to accept the loss with dignity to counter Trump’s attempts to undermine the electoral system.

Obama said that he ‘didn’t see any point in prolonging the inevitable’ and didn’t want to turn the election into a ‘recount mess’ - then having delivered his message he hung up.

The call worked and Clinton’s close aide Huma Abedin called Trump’s campaign manager Kellyanne Conway.

The two candidates were brought to the line and Clinton conceded.

The authors write that Trump credited her for being a smart opponent who ran a tough campaign. The conversation lasted about a minute.

Next came a second, previously undisclosed call from Obama which ‘crystallized everything for Hillary’.

The book says that as the results rolled in for states like Pennsylvania, the clear tipping point for the race for the White House, Obama called Clinton and said: ‘You need to concede’

The book says: ‘Hillary 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.

‘Mr President’, she said softly. ‘I’m sorry’.

As she drafted her acceptance speech Clinton defied her aides who asked her to criticize Trump and said that she wanted a ‘gracious exit’.

Had Clinton won, her victory speech would have been a testament to her beloved mother Dorothy Rodham, the book reveals.

Beneath the glass ceiling of the Javits Center in Manhattan she would have imagined going up to her mother when she was eight years old and telling her: ‘As hard as it might be to imagine, your daughter will one day grow up and become President of the United States.

Shattered also offers a blunt assessment of why Clinton lost and says that some of her team thought that ‘Clinton Inc’, referring to the baggage and machinery of the Clinton family, was an ‘albatross’ around the campaign.

In early 2016 one of her advisers had given her a clear warning that Trump could beat her, a warning which seemed to go ignored.

At the time Clinton was beating Trump 46 points to 41 though neither candidate had secured their party’s nomination.

On election night as it became apparent his wife would lose Florida, Clinton had a ‘sinking feeling that the British vote to leave the European Union had been a harbinger for a kind of screw-it vote in the United States’

According to Shattered, the memo said: ‘FACT: Donald Trump can defeat Hillary Clinton and become the 45th President of the United States’.

The memo warned that Clinton ‘should not underestimate his capacity to draw people to the polls who normally do not vote’ because it could ‘tip the scales in key states’.

Clinton however did not seem to get it and once told her close aide Minyon Moore: ‘I don’t understand what’s happening with the country. I can’t get my arms around it’.

Bill too had sensed that his wife and her campaign team were not grasping the danger that Trump posed.

The authors contend that Bill felt that Brexit showed there was a ‘strong contempt for existing power structures that reflected the mood of the American electorate’.

The book says that Clinton felt his wife’s team were ‘underestimating the significance of Brexit’.

Clinton had come to power in 1992 by tapping into similar frustrations and he knew what it was like to be an insurgent candidate.

The book says: ‘Bill had a better feel for the working stiff, whether American or British, than anyone in Hillary’s orbit.

‘He knew that and he felt like he was being heard. But he couldn’t figure out why Hillary and her team weren’t executing’.

On election night as it became apparent his wife would lose Florida, Clinton had a ‘sinking feeling that the British vote to leave the European Union had been a harbinger for a kind of screw-it vote in the United States’.

He said: ‘It’s like Brexit. I guess it’s real’.

Hillary was 'so mad she couldn't think straight' after being humiliated in the Michigan Democratic primary.

The failed Presidential candidate attacked her aides with a 'potent mix of exhaustion and exasperation' after the embarrassing loss to her rival Bernie Sanders in March last year.

Clinton's top staff said she was 'visibly, unflinchingly p***ed off at us' and blamed them for making her look 'vulnerable'.

Feel the burn: Bill and Hillary Clinton were both in denial about her campaign's flaws and turned on aides time and again

During another tirade Bill Clinton took over and gave aides an 'a** chewing' on the phone and told them to 'do their d**n jobs'.

The details of the rows show the tensions at the top of Clinton's presidential campaign, tensions that she did her best to keep quiet during the election.

They are also revealed in Shattered which is out next week and delivers the scathing verdict that her campaign was 'living in denial'.

The book says that neither Clinton nor her husband 'could accept the simple fact that Hillary had hamstrung her own campaign and dealt the most serious blow to her own presidential aspirations'.

An extract of the book was published by The Hill which said it showed that Clinton's campaign was 'plagued by bickering'.

'Shattered', which is by Jonathan Allen and Amie Parnes and is published by Crown, tells how Clinton had one of her most severe meltdowns on March 9 last year.

The night before she had narrowly lost to Sanders in the Michigan primary 49 per cent to 48 per cent.

Sanders' victory was a shock as not one single poll had him ahead of her going into the vote and some - among them blogger 538 - predicted he would lose with a 99 per cent certainty

But Sanders' anti free trade message struck a chord in the state that relies on auto manufacturing.

The victory showed that Clinton was not going to dispatch him quickly as she had hoped and showed she would have to spend months and tens of millions of dollars fighting him off for the Democratic Presidential nomination.

According to 'Shattered', the loss in Michigan upended Clinton's preparations for her fourth debate with Sanders - so she turned on her staff instead.

The book says that losing Michigan 'robbed her of a prime opportunity to put Sanders down for good but also exposed several of her weaknesses'.

In a morning conference call her staff had set up to let her vent her frustration, Clinton fumed: 'We haven't made our case. We haven't framed the choice. We haven't done the politics'.

On aide who was in the room for the 'humiliating' scene said: 'She was visibly, unflinchingly p***ed off at us as a group. And she let us know she felt that way'.

The staffers tried to make their own points - some of which Clinton agreed with.

Feel the Bern: Bernie Sanders inflicted a shock defeat on Hillary Clinton in Michigan just days after this CNN defeat. Clinton blamed her aides, not herself, for losing, Shattered's authors reveal

They said that she had used the wrong message for Michigan and refused to speak out against free trade as Sanders had done.

They did not have enough organizers on the ground, their polling was too positive and they did not even know Sanders was ahead.

The staffers said that they had focused too much on minority voters instead of whites, even though whites voted heavily for Clinton in 2008 during her previous failed run for the Presidency against Barack Obama.

Clinton had hardly slept the night before, turning over in her mind how her campaign had made 'poor choices' about where they had traveled too.

She emailed Robby Mook, her communications director, to say they had spent too much time in Detroit and Flint and not enough in the white working class suburbs around them.

The morning conference was Mook's attempt to settle Clinton down but it left her 'more perplexed and angry'.

Blamed: Clinton laid into Robbie Mook (left), the book reveals. And longtime aide Jake Sullivan (right) was involved in an ugly clash as he played Clinton in a mock debate

Blamed: Huma Abedin was one of the aides at a conference call dressing-down.

'Shattered' says: 'The underlying truth - the one that many didn't want to admit to themselves - was the person ultimately responsible for these decisions, the one whose name was on the ticket, hadn't corrected these problems, all of which had been brought to her attention before primary day. She'd stuck with the plan, and it had cost her'.

As Jake Sullivan, Clinton's chief strategist, tried to turn her to preparation for the Miami debate, Clinton finally lost it.

After one of her answers he said: 'That's not very good'.

According to 'Shattered' Clinton snapped back: 'Really?' - and the room fell silent.

Sarcastically she said: 'Why don't you do it?'

So they did: for the next 30 minutes they swapped roles with Clinton attacking Sullivan as he did his best impersonation of her.

Sullivan, a Yale Law School graduate and a high school debating champion, could hardly talk without Clinton cutting him off and saying: 'That isn't very good. You can do better.'

Then she would 'hammer him with a Bernie line'.

The entire episode recalled an earlier incident in which Bill Clinton took the lead in lambasting her staff.

The attack took place months earlier during the height of the row about her use of a private email server.

The story would dog Clinton her entire campaign and a week before the election FBI director James Comey revealed he was reopening the bureau's investigation into the scandal, a move which caused her polls to dip.

Clinton would later blame Comey for losing her the election.

According to 'Shattered' Clinton felt that her staff were not doing enough to get the media to focus on her message instead of the server.

She let rip in a conference call to her staff who were huddled into the office of her top adviser Huma Abedin in the campaign HQ in Brooklyn.

Also there were Joel Benenson, one of her chief strategists, Mandy Grunwald, her top advisor, Jim Margolis, a media advisor, John Anzalone, one of her best consultants, John Podesta, her campaign chair, Mook and Dan Schwerin, her speechwriter.

'Shattered' says that Bill Clinton was 'spurring (his wife) on to cast blame on others and never admit to anything'.

The book says that Clinton's voice sounded 'severe' and 'controlled' like a 'disappointed teacher or mother delivering a lecture before a whipping'.

The book says: 'That back end was left to Bill, who lashed out with abandon. Eyes cast downward, stomachs turning - both from the scare tactics and from their own revulsion at being chastised for Hillary's failures - Hillary's talented and accomplished team of professionals and loyalists simply took it. There was no arguing with Bill Clinton'.

Bill attacked them for not having 'buried this thing' and for not figuring out how to 'get Hillary's core message to the voters'.

He told them that 'this has been dragging on for months, he thundered, and nothing you've done has made a damn bit of difference'.

Bill told them to tell voters about his wife's plans for the economy and to 'do your damn jobs'.

When Clinton came back on the line her staff felt it was 'hard to tell what was worse - getting hollered at by Bill or getting scolded by the stern and self-righteous Hillary'.

According to aides they thought that 'neither was pleasant' as Clinton told them: 'Get it straight'.

Shattered: Inside Hillary Clinton's Doomed Campaign is available for pre-order on Amazon.