WASHINGTON - President Obama publicly accused Russian President Vladimir Putin of involvement in cyberattacks aimed at the U.S. election and leveled a threat on Friday - that the United States would retaliate, perhaps in ways no one but the Russians would see.

Obama said he had "great confidence" in the assessment by U.S. intelligence agencies that the Russians had carried out computer hacks aimed at the Democratic National Committee and senior aides to presidential nominee Hillary Clinton, and that the operation had been approved at "the highest levels" in Moscow.

"Not much happens in Russia without Vladimir Putin," he added, saying that the Russians needed to understand that "we can do stuff to you."

U.S. counterstrikes would come "in a thoughtful, methodical way" and would be felt by the Russians, Obama said. "Some of it, we will do in a way that they know, but not everybody will."

Obama's statement came as CIA and FBI officials sought to rebut claims that the agencies were at odds in their assessment of Russia's role in the attacks.

In a message to CIA employees, the agency's director, John Brennan, said that a "strong consensus" existed among U.S. intelligence services that Russia orchestrated hacks and that the online leaks were designed at least in part to help Donald Trump win the White House.

FBI Director James B. Comey and Director of National Intelligence James R. Clapper Jr. agreed with that assessment, Brennan wrote. He had met separately with both of them, Brennan added, and "there is strong consensus among us on the scope, nature and intent of Russian interference in our presidential election."

The message was confirmed by a U.S. official after it was first reported by the Washington Post.

A second U.S. official said the FBI concurred with intelligence agencies that the Russian government had orchestrated the cyberattacks, which disclosed emails from the files of the DNC as well as Clinton campaign chairman John Podesta and other top Democrats.

Both officials spoke on condition of anonymity because the investigation was continuing and portions of it are classified.

Although FBI agents have not determined Russia's motive with certainty, they can tell the hacks targeted Democrats and benefited Trump.

Whether the Russians were trying to help elect Trump, sow confusion in the electoral process, undermine an eventual Clinton presidency or achieve a combination of those outcomes remains unclear to agents, the second official said.

Russian officials have denied involvement in the hacking and have said the United States should show more proof or let the subject drop.

Trump has repeatedly denied that anyone knows whether Russia was behind the leaked emails and has mocked the CIA's assessment that top Russian officials intervened to help him get elected.

In the face of those denials, Obama, who has directed U.S. intelligence agencies to complete a thorough review of the Russian actions before he leaves office, said his administration would disclose at least some of the evidence to the public. But, he warned, much of it would have to remain secret.

"We will provide evidence that we can safely provide, that does not compromise sources and methods," he said. He added: "When you are talking about cybersecurity, a lot of it is classified, and we're not going to provide it because the way we catch folks is by knowing certain things about them that they may not want us to know."

Obama's final scheduled news conference of the year - an unusually long 90-minute affair that was interrupted briefly while the White House doctor attended to a reporter who had fainted - revealed a deepening preoccupation with Putin and Russia in the waning days of his presidency.

Asked about Trump's dealings with China and Taiwan since the election, Obama cautioned the president-elect not to wade too deeply into foreign policy too soon.

Obama said he had told Trump 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" and "fully briefed" so they "know what they're talking about."

And he repeated that the blame for the carnage in Aleppo, Syria, where thousands more civilians were killed or displaced in the last week, should fall on the Syrian government and its Russian allies.