President Obama held his first news conference since voters sharply rejected his candidate and his party at the polls last week, reassuring people at home and abroad that Donald Trump was committed to governing in a more pragmatic fashion than his harsh campaign style would suggest.

“He’s going to be the next president and regardless of what experience or assumptions he brought to the office,” said Obama, who met with Trump for the first time last week. “This office has a way of waking you up.”

Obama faced reporters crammed into the James S. Brady Briefing Room on Monday before leaving Washington for a week-long foreign trip to Greece, Germany and Peru, where he will meet with more than a dozen foreign leaders with their own set of worries about where the United States is headed under its next president.

At moments the president offered advice to his successor that sometimes sounded like a warning. He urged Trump to respect “those norms that are vital to a functioning democracy,” such as “civility and tolerance and a commitment to reason and facts and analysis.” For months Obama had accused candidate Trump of breaching those norms during a bitter and contentious campaign.

After last week’s shocking election results, Obama struck a more sanguine note. “I think he’s sincere in wanting to be a successful president and moving this country forward,” Obama said. “I don’t think any president ever comes in saying to himself, ‘I want to figure out how to make people angry or alienate half the country.’ ”

President Obama said during a news conference Monday that it's "healthy" for the Democratic Party to go through reflection. "When your team loses, everyone gets deflated," Obama said. (The Washington Post)

The president sought to reassure U.S. allies, noting that in his conversation with Trump last week, the New York businessman “expressed a great interest in maintaining our core strategic relationships,” including the one with NATO. As he visits with world leaders, Obama vowed to let them know “that there is no weakening of resolve” when it comes to America meeting its commitments and defending its allies.

Throughout the hour-long news conference, Obama sought to calm and reassure a jittery and divided country, choosing his words carefully and emphasizing unity over division.

On many issues the president conceded that he and Trump continue to have competing visions on where to take the country and that his worries about Trump’s fitness for office and temperament haven’t disappeared. “Of course I have got concerns,” Obama said.

He sought solace in the notion that change in Washington usually takes time.

“The federal government and our democracy is not a speedboat. It’s an ocean liner,” Obama said.

And he expressed hope that on issues such as the Affordable Care Act, the Iran nuclear deal and the Paris Agreement to reduce greenhouse gas emissions, Trump would modify his position.

“I don’t think he is ideological. I think, ultimately, he is pragmatic,” Obama said. “And that can serve him well as long as he has got good people around him and he has a clear sense of direction.”

President Obama said that his administration "stands ready" to assist President-elect Donald Trump and his staff as they transition to the White House in January. (Victoria Walker/The Washington Post)

The president declined to comment on Trump’s highest-profile and most controversial appointment so far — senior counselor and chief strategist Stephen K. Bannon, former chief executive of the conservative website Breitbart News. Bannon is closely associated with the alt-right movement, which white nationalists have embraced.

“Without copping out, I think it’s fair to say that it would not be appropriate for me to comment on every appointment that the president-elect starts making if I want to be consistent with the notion that we are going to try to facilitate a smooth transition,” Obama said.

The president declined to answer a question on whether he still saw Trump as unfit to serve in the Oval Office — a criticism he had leveled more than once during the campaign — and instead emphasized that he had counseled the president-elect to reach out to some constituencies that had not supported his bid.

“It is important to send some signals of unity” to minorities, women and other groups “that were concerned about the tenor of the campaign,” Obama said.

In a sign of how Obama has been working doggedly to influence Trump to preserve some of his administration’s landmark achievements, the president spoke of the need to improve the Affordable Care Act rather than jettison it. He made a passionate case for not forcing children of undocumented immigrants to leave the country.

“I will urge the president-elect and the incoming administration to think long and hard before they are endangering the status of what, for all practical purposes, are American kids,” he said.

Going before the media soon after a major election is a rite of passage for the president. In Obama’s case, only one of these exchanges has been celebratory. While he could embrace his 2012 reelection victory, both the 2010 and 2014 midterms and now the election of his successor have amounted to serious setbacks.

Six years ago, Obama called the Democrats’ congressional losses a “shellacking”; in 2014, he declined to characterize the results, saying instead to the American people, “I hear you.”

Obama spent much less time talking about what contributed to Democrats’ latest losses, which were punctuated by disappointing turnout among some minority groups and a poor showing in rural areas and some key suburbs.

But he acknowledged that Democrats need to engage in “some reflection” about the way they campaign and connect with the American people.

“I believe that we have better ideas, but I also believe that good ideas don’t matter if people don’t hear them,” he said. “We have to compete everywhere. We have to show up everywhere.”

Much of the president’s hour-long news conference was dominated by questions of his view of Trump’s character, temperament and fitness for office. Obama offered careful praise for Trump’s ability to galvanize his constituency.

“What’s clear is that he was able to tap into, yes, the anxieties, but also the enthusiasm of his voters in a way that was impressive,” the president said. He observed that Trump was “impervious to events that might have sunk another candidate. That’s powerful stuff.”

But Obama cautioned that Trump would not be able to govern as he campaigned: “There are going to be certain elements of his temperament that will not serve him well unless he recognizes them and corrects them.”