'He's a madman': Obama privately blasted Trump as a 'racist lunatic' according to new book
US President-elect Donald Trump and President Barack Obama's comments on each other have not always been complimentary (AFP Photo/JIM WATSON)

Barack Obama largely stayed publicly quiet about Donald Trump during his successor's presidency, but behind the scenes he was harshly critical of the former reality TV star who had questioned his birthplace.

Excerpts from a new book, Battle for the Soul: Inside the Democrats' Campaigns to Defeat Donald Trump, by Edward-Isaac Dovere, a staff writer at The Atlantic, obtained by The Guardian showed Obama referred to Trump in private as a "madman," a "racist, sexist pig," "that f*cking lunatic" and a "corrupt motherf*cker."

"He's a madman," Obama said, according to Dovere. "More often: 'I didn't think it would be this bad.' Sometimes: 'I didn't think we'd have a racist, sexist pig.' Depending on the outrage of the day … a passing 'that fucking lunatic' with a shake of his head."

Obama was angered by reports that Trump spoke to foreign leaders, including Russian president Vladimir Putin, without any aides present.

"'That corrupt motherfucker,' he remarked," according to Dovere.