Russian President Vladimir Putin listens to Prince Albert II of Monaco at the Kremlin on Oct. 6. (Yuri Kadobnov/AP)

The Obama administration on Friday officially accused Russia of attempting to interfere in the 2016 elections, including by hacking the computers of the Democratic National Committee and other political organizations.

The denunciation, made by the Office of the Director of National Intelligence and the Department of Homeland Security, came as pressure was growing from within the administration and some lawmakers to publicly name Moscow and hold it accountable for actions apparently aimed at sowing discord around the election.

“The U.S. Intelligence Community is confident that the Russian Government directed the recent compromises of e-mails from U.S. persons and institutions, including from U.S. political organizations,” said a joint statement from the two agencies. “. . . These thefts and disclosures are intended to interfere with the U.S. election process.”

The public finger-pointing was welcomed by senior Democratic and Republican lawmakers, who also said they now expect the administration to move to punish the Kremlin as part of an effort to deter further acts by its hackers.

“Today was just the first step,” said Sen. Ben Sasse (R-Neb.), a member of the Homeland Security Committee. “Russia must face serious consequences. Moscow orchestrated these hacks because [Russian President Vladimir] Putin believes Soviet-style aggression is worth it. The United States must upend Putin’s calculus with a strong diplomatic, political, ­cyber and economic response.”

The Post's Ellen Nakashima goes over the hacking incidents and discusses the two groups responsible. (Jhaan Elker/The Washington Post)

The White House has been mulling potential responses, such as economic sanctions, but no formal recommendation to the president has been made.

The DNC publicly disclosed the intrusions in June, saying its investigation determined that Russian government hackers were behind the breach. That was followed shortly after by a major leak of DNC emails, some so embarrassing that they forced the resignation of the DNC chairwoman, Rep. Debbie Wasserman Schultz (Fla.), on the eve of the Democratic National Convention.

The administration also blamed Moscow for the hack of the Democratic Congressional Campaign Committee and the subsequent leak of private email addresses and cellphone numbers of Democratic lawmakers.

Other leaks of hacked material followed.

The digitally purloined material has appeared on websites such as DC Leaks and WikiLeaks. It has included the private emails of former secretary of state Colin Powell and aides to former secretary of state and Democratic presidential nominee Hillary Clinton.

An online persona calling himself Guccifer 2.0 has claimed responsibility for posting the material. Those sites and that persona are “consistent with the methods and motivations of Russian-directed efforts,” the joint statement said. “. . . We believe, based on the scope and sensitivity of these efforts, that only Russia’s senior-most officials could have authorized these activities.”

The Kremlin on Friday dismissed the administration’s accusation.

“This is some sort of nonsense,” said Dmitry Peskov, press secretary for Putin. “Every day, Putin’s site gets attacked by tens of thousands of hackers. Many of these attacks can be traced to U.S. territory. It’s not as though we accuse the White House or Langley of doing it each time it happens.”

Hours after the administration called out Russia, WikiLeaks released some 2,000 emails apparently hacked from the personal Gmail inbox of Clinton’s campaign chairman, John Podesta. They included excerpts of speeches Clinton made to Wall Street banks that she had resisted making public. In one of them, she said that Wall Street knew best how it should be regulated. The campaign has not acknowledged the excerpts’ authenticity. There was no immediate word from the FBI as to whether the Russians were behind the alleged hack.

The Obama administration noted that attempts to interfere in other countries’ political processes are not new to Moscow. Russian hackers have used hacking and other techniques to influence public opinion in Europe and Eurasia, it noted. On the eve of a critical post-revolution presidential vote in Ukraine in 2014, for instance, a digital assault nearly crippled the website of the country’s central election commission.

The intelligence community has for weeks been confident that hackers tied to Russian spy agencies were behind the DNC hack. Senior officials at the Justice Department and DHS pressed the White House to go public with an accusation.

But a number of administration officials were worried that such a statement would appear to politicize the issue in the weeks before the election. They were also concerned about the Kremlin’s reaction and about inadvertently disclosing sensitive intelligence sources and methods.

“Is it in our interest to act?” Lisa O. Monaco, Obama’s adviser on counterterrorism and homeland security, said at a Washington Post cybersecurity summit Thursday. “The primary guiding and overarching focus in these discussions is: What is in the national security interest of the United States? That’s the North Star for those discussions.”

Senior administration officials in recent weeks had begun to hint that a public attribution might be coming.

“We know Russia is a bad actor in cyberspace, just as China has been, just as Iran has been,” ­Monaco said at a cybersecurity conference at the Center for Strategic and International Studies last month. “Nobody should think that there is a free pass when you’re conducting malicious cyber-activity.”

Assistant Attorney General John Carlin said at the same event that the message to countries, such as Russia, that attempt to meddle in the U.S. election is, “You can and will be held accountable.”

With the public naming of Moscow, the administration has now officially called out all its major nation-state foes in cyberspace: China, Iran, North Korea and Russia. But among the four, Russia is the only government that has not been subject to a deterrent measure.

The administration has a range of options, including economic sanctions for malicious cyber-activity, a new tool created by the president that has yet to be used. The Justice Department could bring indictments for hacking. The National Security Agency could take a covert action in cyberspace to send a signal to the Kremlin. Or the State Department can decide to eject Russian diplomats.

Jason Healey, a senior research scholar on cyber-issues at Columbia University, said the Pentagon’s Cyber Command should disrupt Russian hacking operations. “Go after their command and control,” he said. “ ‘Counteroffensive’ is the key word here.”

Rep. Adam B. Schiff of California, the ranking Democrat on the House Intelligence Committee, urged the administration to work with European allies to develop a “concerted” response, whether it involves economic sanctions or other measures.

“The best way to push back,” Schiff said, “is in a truly international effort to let the Russians know there will be costs to this latest form of cyber-aggression against others.”

David Filipov contributed to this report.