President Obama believes Hillary Clinton was not covered fairly by the press during the 2016 presidential election.

Clinton was "treated unfairly," Obama said at a White House press briefing on Friday. "I think the coverage of her and the issues was troubling."

The indictment of the media's coverage came as Obama said that recent hacks intended to hobble Clinton's campaign came from the highest levels of Russian government. Those hacks revealed private emails from Clinton campaign chair John Podesta and the Democratic National Committee that were exhaustively covered by U.S. media.

"I'm finding it curious that everybody is suddenly acting surprised that this looked like disadvantaging Hillary Clinton because you guys wrote about it everyday," Obama said. "This was an obsession that dominated the news coverage."

Obama also chided partisan media outlets for creating an environment in which fake news produced by foreign governments was able to thrive.

"If fake news that's being released by some foreign government is almost identical to reports that are being released through partisan news venues, it's not surprising that that foreign propaganda will have a greater effect," the president said.

Fake news "doesn't seem that far-fetched because it doesn't seem that different from what folks are hearing from domestic propagandists," he said.

Such criticisms of the media are not unusual for the 44th president. He has often delighted in poking fun at the media for sensational coverage that stokes partisan divisions.

Yet his claim that Clinton was "treated unfairly" was also a direct challenge to the media to reconsider its approach to campaign coverage in the future.

Obama used the conference to address his own legacy, saying at one point: "You cannot argue that we are not better off. We are."

Asked as he was leaving the podium if this would be his last news conference, Obama replied: "I don't know. I'll have to reflect on that. I enjoyed it."