President Barack Obama used one of the last news conferences of his presidency Friday to lament the country's deep political divisions, asserting that they make the United States vulnerable to foreign manipulation, and to warn President-elect Donald Trump to be less casual in his dealings with foreign leaders.

"My advice to him has been that before he starts having a lot of interactions with foreign governments other than the usual courtesy calls, that he should want to have his full team in place," Obama said. ". . . He should want his team to be fully briefed on what's gone on in the past and where the potential pitfalls may be. You want to make sure you're doing it in a systematic, deliberate, intentional way."

For the past five weeks, Obama has tried to hide his disappointment about Trump's win and to remain publicly upbeat about the country and its institutions. On Friday, the optimistic facade began to crack.

He worried that the political discourse had been degraded to a point where "everything is under suspicion, and everybody is corrupt, and everybody is doing things for partisan reasons, and all of our institutions are, you know, full of malevolent actors."

Obama began by praising the American people for driving an economic recovery that has cut the unemployment rate by more than half. He credited the Affordable Care Act for revamping the nation's health-care system and bragged about the more than 670,000 people who signed up for health insurance on Thursday.

"By so many measures our country is stronger and more prosperous than it was when we started," he said. "And I could not be prouder to be your president."

But with many of the questions focused on revelations about Russian interference in the U.S. presidential election to help Trump, Obama seemed uncharacteristically concerned about the soundness of some bedrock U.S. institutions.

The president has been adamantly insisting for years that the only way terrorists could defeat the United States was if the country lost its moorings or deserted its values. On Friday, he suggested that might have started to happen.

More than once, Obama cited research that many Republicans now view Russian President Vladimir Putin more favorably than they did before this year's election. According to the Economist-YouGov survey, more than a third of voters who support Trump have a positive view of Putin.

"Over a third of Republican voters approve of Vladimir Putin, the former head of the KGB. Ronald Reagan would roll over in his grave. And how did that happen?" he asked. "It happened in part because for too long, everything that happens in this town, everything that's said is seen through the lens of does this help or hurt us relative to Democrats, or relative to President Obama."

"And unless that changes, we're going to continue to be vulnerable to foreign influence, because we've lost track of what it is that we're about and what we stand for," he added.

At different points the president seemed doubtful about the functional effectiveness of the U.S. press, politicians and even citizens - whom he often has exempted from his harshest critiques in the past.

How is it that "the basic decency and goodness of the American people" has become so muted in the national political discourse, he asked, that "you have voters and unelected officials who have more confidence and faith in a foreign adversary than they have in their neighbors?"

Obama faulted political reporters for what he described as their "obsession" with emails hacked from Democrats, allegedly by the Russians. And he complained that the level of attention paid to those emails seemed inappropriate when there were "so many big issues at stake, and such a contrast between the candidates came to be dominated by a bunch of these leaks."

"You guys," he chastised the press corps, "wrote about it every day, every single leak about every little juicy tidbit of political gossip, including John Podesta's risotto recipe." Podesta chaired Hillary Clinton's recent presidential campaign.

When the subject turned to Syria, Obama bridled when asked whether he felt a responsibility for the unfolding tragedy in Aleppo, where the atrocities perpetrated by the Syrian regime against residents in the onetime rebel stronghold are being witnessed by the outside world in real time.

"There are places around the world where horrible things are happening, and because of my office, because I'm president of the United States, I feel responsible," he said. "I ask myself every single day, 'Is there something I could do that would save lives and make a difference and spare some child who doesn't deserve to suffer?' "

But the many meetings he held with his advisers - "if you tallied it up, days and weeks of meetings" - always ended with the same conclusion: Nothing short of a full-scale U.S. military intervention would change the equation in Syria.

"And everything else was tempting because we wanted to do something and it sounded like the right thing to do, but it was going to be impossible to do this on the cheap," Obama said.

Obama pointedly declined to pass judgment on some of Trump's recent foreign policy pronouncements - including a renewed call for establishing safe zones in Syria and potentially recognizing Taiwan over China's objections. The president said he continued to engage in "cordial" conversations with Trump and has offered the president-elect advice in private. Still, he tried to clarify why some of Trump's moves could be seriously destabilizing.

"The idea of 'one China' is at the heart of their conception as a nation," Obama said of that country's opposition to Taiwan being recognized diplomatically by other countries. "That status quo, although not completely satisfactory to any of the parties involved, has kept the peace."

Obama said that he had spoken with Trump just a few days ago and that he held out hope that he can "transmit some thoughts about maintaining the effectiveness, integrity, cohesion of the office, our various democratic institutions, and he has listened."

The president-elect might be able to help unify the country if he acknowledges that U.S. officials have learned, Obama said, "how Internet propaganda from foreign countries can be released into the political bloodstream, and that we have got strategies to deal with it for the future."

But Obama acknowledged that there is no simple solution.

"I guess part of my overall message here as I leave for the holidays is that if we look for one explanation or one silver bullet or one easy fix for our politics, then we're probably going to be disappointed," he said. "There are just a lot of factors in what's happened, not just over the last few months but over the last decade, that has made both politics and governance more challenging."

The Washington Post's Greg Jaffe contributed to this report.