Barack Obama isn’t pulling his punches on the way out the door. In his last press conference of the year, the president on Friday harshly criticized Russia—a “weaker country” that does not “produce anything that anybody wants to buy except oil and gas and arms”—and offered a stinging rebuke to Republicans who, he suggested, had put party before country.

“There was a survey that some of you saw where, now this is just one poll but a pretty credible source, that 37% of Republican voters approve of Putin,” Obama said, citing a recent poll that found a growing number of conservatives supporting the former K.B.G. official, an autocrat who has jailed journalists and is alleged to have ordered the assassinations of political opponents. “Ronald Reagan would roll over in his grave,” he said.

Forced to address the fact that a substantial portion of the electorate—including the president-elect—have aligned themselves on some issues with Russia, a longtime adversary, Obama blamed political polarization. “What I worry about—more than anything—is the degree to which, because of the fierceness, because of the partisan battle, you start to see certain folks in the Republican Party and Republican voters suddenly finding a government and individuals who stand contrary to everything that we stand for as being O.K., because that's how much we dislike Democrats.”

While Obama threatened that the U.S. would retaliate against Russia’s efforts to hack the U.S. election—“We can do stuff to you,” he warned—many within the Republican Party have remained more or less silent on the issue, despite the conclusion of the F.B.I. and the C.I.A. that Putin sought to throw the presidential race to Donald Trump. While a number of lawmakers have called for investigations, others have echoed the president-elect, who has dismissed the allegations as a political ploy to undermine his incoming administration. “It is disappointing that the C.I.A. would provide information on this issue to The Washington Post and NBC but will not provide information to elected members of Congress,” Rep. Ron Johnson, the chair of the House Homeland Security Committee, said in a statement.

Obama suggested he was shocked that “some folks who had made a career out of being anti-Russian” had stood by Trump as he made repeated laudatory comments about Putin, and at one point, openly called on the Russian leader to hack Hillary Clinton’s e-mail server, even as intelligence agencies offered repeated warnings about Russian efforts to influence the election. “Suddenly they're asking, oh, why didn't you tell us that maybe the Russians were trying to help our candidate? Well, come on.”

Right-wing media, Obama argued, shoulder some of the blame for undermining trust in government and misleading their conservative audiences about basic facts in order to settle political scores. “And how did that happen? 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,” he said. “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.”