(Bastien Inzaurralde/The Washington Post)

Russian President Vladimir Putin repeatedly accused Hillary Clinton when she was secretary of state of interfering in Moscow’s affairs — and if Russian security was behind last week’s release through WikiLeaks of the hacked Democratic National Committee emails, it would look a lot like Kremlin payback.

Even if the breach was carried out by a mid-level intelligence official acting on his own initiative, hoping to please his boss, disclosures that seemingly raise questions about the legitimacy of Clinton’s nomination speak directly to Putin’s complaints about her.

American law enforcement and intelligence officials suspect that Russian military intelligence, the GRU, carried out the hack of the DNC email server, though no one has been able to suggest how the material got into the hands of WikiLeaks.

“We do not deal with hackers. We have nothing to do with such activities,” Dmitry Peskov, the Kremlin spokesman, told Russian reporters Thursday.

“As to any direct or indirect accusations against the Kremlin or Russia in general alleging that they could be somehow involved in some kind of cyberattacks,” he said, “these claims are an absurd and colorful example of the use of Russophobia in the interest of an election campaign in the United States. It is absurdity bordering on stupidity.”

Peskov had earlier dismissed the allegations by arguing that American politicians always like to keep a “Russia card” on their desks and will play it whenever it can help them.

The Kremlin’s critics have long pointed out that Putin likes to play the “America card” at times of stress.

In December 2011, large protests unexpectedly broke out in Moscow following parliamentary elections that featured brazen cheating. Clinton, as secretary of state, called the election “neither free nor fair,” and Putin jumped on that as an attack on Russia and, by extension, him.

“She set the tone for some of our public figures inside the country, sent a signal to them,” Putin said. “They heard this signal and launched active work with the U.S. State Department’s support.”

The rest of that winter saw ever sharpening attacks on the United States as Putin was in the midst of his own presidential election campaign. In the year that followed, some of the strongest anti-American steps that Russia took were only tangentially related to Clinton — expelling the USAID, forcing Radio Liberty off the AM dial, harassing then-U.S. Ambassador Michael A. McFaul.

And when Congress pushed through the 2012 Magnitsky Act, placing travel and banking sanctions on certain Russian officials deemed to be corrupt or human rights violators, Moscow’s furious response was a law banning adoptions of Russian children by Americans. Clinton had said little about the act, and the White House had at first tried to deflect it.

Yet Clinton was the face of American diplomacy. Together, her public support for anti-Putin protesters, and the American sanctions on Russian officials over the persecution and death of Sergei Magnitsky, a whistleblower, struck directly at Putin’s greatest vulnerability — his legitimacy, as Viktor Kremenyuk, deputy director of the Institute for the USA and Canada Studies in Moscow, said at the time.

Clinton had also pushed hard for the Libya intervention in the spring and summer of 2011, which Putin was appalled by, seeing it as unwarranted interference in another nation’s sovereignty. After she stepped down as secretary of state, she made a well-publicized visit to Yalta — in 2013, when it was still part of Ukraine — to support Ukraine’s signing of an agreement with the European Union. Putin hoped to strong-arm Ukraine into joining his Eurasian Economic Union, which Clinton had called an attempt to “re-Sovietize” areas of the former Soviet Union.

That comment and others “were in part seized upon for domestic political reasons,” Samuel Charap, senior fellow at the International Institute for Strategic Studies in Washington, said Wednesday. “She became a convenient scapegoat.”

Russian leaders, he said, see “the attitudes embedded in those comments as emblematic of the broad U.S. political establishment out to get them.”

Pro-Kremlin analysts point out that when Bill Clinton was president he tried to guide Russia toward new political, legal and economic policies and largely failed. They worry that Hillary Clinton will try to pick up where he left off. Asked about her last spring, Putin said, “As we say, husband and wife are the same Satan.” (That’s a common folk expression in Russia, and isn’t quite as damning as it sounds in English.)

For the past few months, the Russian media have been declaring that Donald Trump would be better for Russia than Clinton, because of his seemingly hands-off approach toward Eastern Europe and his expressed desire to upend the U.S. political establishment.

But Igor Ivanov, Russia’s former foreign minister, counsels caution. Now president of the Russian International Affairs Council, he wrote earlier this month: “It is usually easier to achieve an agreement with experienced professionals, even if they are inflexible negotiators and difficult partners. They are predictable, rational, and they are well aware of their limitations. A ‘newcomer’ in international politics is usually harder to work with: the lack of experience often translates into inconsistent and unpredictable behavior; it leads to subjective, emotional and at times erroneous decisions that can be very hard to rectify later on.”

Charap says it unlikely that the Kremlin was responsible for the release of the DNC emails — the hacking, yes, but not the release, because it seems out of character. Still, he said, Russian officials could say, “ ‘This is what the U.S. does everywhere. You guys have been training opposition activists for years. What’s the difference?’ Of course there is a difference.”

Trump on Wednesday suggested at a news conference that he would be pleased if the Russians could get their hands on more of Clinton’s emails. It looked like an extraordinary invitation to Moscow to interfere in the U.S. election.

But what’s the long-range benefit to Putin? Lilia Shevtsova, a Russian political analyst who has been an acerbic critic of Putin, asked in a blog post what Russia could gain from the incident. Suspicion naturally falls on Moscow, she wrote, and if it’s shown that Russian intelligence was behind the hack, the United States will have to do something about it. Clinton won’t take it lightly, she wrote, and if Trump is elected even he will feel compelled to prove his willingness to stand up to the Kremlin.

Natasha Abbakumova in Moscow contributed to this report.