When Donald Trump won the 2016 presidential election, then-President Barack Obama expressed disappointment that voters seemed to want a "cartoon" as president, according to a book by one of his former advisers.

Ben Rhodes, former Obama deputy national security adviser, wrote about Obama's worries in his upcoming book The World as It Is: A Memoir of the Obama White House, the New York Times reports. The book focuses on Rhodes' eight years in Obama's administration, as he examines the decisions to intervene in Libya and to authorize the raid to kill al Qaeda leader Osama bin Laden.

Obama spoke with his chief speechwriter, Cody Keenan, and Rhodes by telephone on election night to figure out what he should say, prompting Rhodes to ask if he should offer his reassurances to allies. "No, I don’t think that I’m the one to tell them that," Obama said.

A day after the election, Obama sent a message to Rhodes to cheer him, saying "There are more stars in the sky than grains of sand on the earth."

But days later, Mr. Obama seemed less sanguine. "I don’t know," he told aides. "Maybe this is what people want. I’ve got the economy set up well for him. No facts. No consequences. They can just have a cartoon." He added that "we’re about to find out just how resilient our institutions are, at home and around the world."

In the weeks following the election, Obama called Trump a "cartoon" figure who seemed to care more about crowd sizes than specific policies, expressing self-doubt and asking "whether he had misjudged his own influence on American history."

Elsewhere in the book, Rhodes recounts how Obama openly questioned whether his presidency came "10 or 20 years too early" for the country. Rhodes also said the Obama team should have seen Hillary Clinton's defeat coming because they also labeled her "part of a corrupt establishment."