Barack Obama was the person who told Democratic nominee Hillary Clinton that she had to concede the presidential election to Donald Trump after a disappointing showing at the polls in November 2016.

The disclosure comes in a book detailing Clinton's election campaign and disappointing loss to unlikely rival Trump – whom she called to congratulate after her surprising defeat.

Shattered: Inside Hillary Clinton's Doomed Campaign, by journalists Jonathan Allen and Amie Parnes, explores the lead up to Clinton's election defeat and details the moment she called Trump to concede the election.

"Congratulations, Donald," Clinton reportedly told the then businessman mogul.

"I'll be supportive of the country's success, and that means your success as president."

Her phone call to Trump came shortly after a call with then-president Obama, who contacted her as soon as it became clear she was no longer on the path to victory.

"Mr President, I'm sorry," Clinton told Obama when he called to discuss the result, with the president telling Clinton: "you need to concede."

Despite Clinton originally being unwilling to concede with a number of states left to call, Obama was reportedly keen to ensure there was no drawn-out recount and encouraged the Democrat to contact Trump.

Obama also repeated his sentiments during a follow-up phone call with Clinton's campaign chairman John Podesta – both convincing Clinton it was time to make the phone call to Trump, The Huffington Post reports.

Clinton Obama
US president Barack Obama speaks during a campaign rally with democratic presidential candidate former Secretary of State Hillary Clinton in Charlotte, North Carolina Justin Sullivan/ Getty Images

The journalists also examine areas of Clinton's campaign that proved damaging to the final election result – not least the emails leaks, and strong competition from Senator Bernie Sanders, whose criticism of Clinton during the primaries often mirrored Trump's later rhetoric about his rival.

"For both sides, Hillary was the perfect symbol of everything that was wrong with America," the book states, in an extract carried by NPR.

"At times, Trump and Sanders would act as the right and left speakers of a stereo blaring a chorus on repeat: Hillary's a corrupt insider who has helped rig the political and economic systems in favor of the powerful."