In the final weeks of a dizzying presidential campaign, Donald Trump is suddenly embracing an unlikely ally: The document-spilling group WikiLeaks, which Republicans denounced when it published classified State Department cables and Pentagon secrets about the wars in Iraq and Afghanistan.

Trump, his advisers, and many of his supporters are increasingly seizing on a trove of embarrassing emails from Hillary Clinton’s campaign that WikiLeaks has been publishing — and that US intelligence agencies said Friday came largely from Russian intelligence agencies, with the authorization of “Russia’s senior-most officials."

The Trump campaign’s willingness to use WikiLeaks is an extraordinary turnabout after years of bipartisan criticism of the organization and its leader, Julian Assange, for past disclosures of US national security intelligence and other confidential information.

The accusation that Russian agents are now playing an almost-daily role in helping fuel Trump’s latest political attacks on Clinton raises far greater concerns, though, about foreign interference in a presidential election.

With the White House weighing its next move — from possible sanctions to covert, retaliatory cyber action — Russian President Vladimir V. Putin insisted Wednesday that his nation was being falsely accused. “The hysteria is merely caused by the fact that somebody needs to divert the attention of the American people from the essence of what was exposed by the hackers," Putin said.

He did acknowledge that the disclosures were the work of an illegal hack — which is further than Trump went in Sunday’s debate. In one exchange with Clinton, the Republican candidate said: “Maybe there is no hacking. But they always blame Russia," he said, as part of an effort to “tarnish me."

Trump has seized on more than 6,000 emails published so far this week, apparently from the personal Gmail account of Clinton’s campaign chairman, John D. Podesta. Based on a few emails plucked from the account, Trump and his team have accused Clinton aides of improperly receiving inside information from the Obama administration.

That stems from correspondence that shows the campaign received an update from the Justice Department about the timing of the release of Clinton’s State Department emails. On Wednesday, Trump advisers flagged others messages that, they argued, were critical of New Hampshire voters and of Catholics.

As Trump struggles to rebound from revelations that he bragged in 2005 about his power to sexually assault women, Republican allies say he has come to believe that WikiLeaks could yield a critical mass of negative and destructive information — if not a smoking gun — that drives up Clinton’s already high unfavourable ratings with voters and perhaps even derails her candidacy.

Following Trump’s wishes, his advisers have aggressively pushed the Clinton camp emails in news media briefings and cable news appearances, bringing up the hacked messages to battle back from the questions about Trump’s comments about women. But as much as Trump sees WikiLeaks coming to his rescue, strategists in his own party take a dim view of its ultimate impact.

The Clinton campaign is trying its own political jujitsu with the hacks, arguing that they are more evidence that Trump is in the pocket of Putin, whom the Republican candidate has declined to denounce for his annexation of Crimea, his intimidation of former Soviet states that are now part of Nato, or for its abandonment last week of a nuclear arrangement with the US. Podesta has gone even further, saying in a statement Wednesday evening that there was “the possibility that Trump’s allies had advance knowledge of the release of these illegally obtained emails."

Also Read: Some in GOP who deserted Donald Trump are now returning

Intelligence officials say that so far they have not concluded there was any such collusion, but the investigation into who got into Podesta’s emails, and how they got into WikiLeaks’ hands, has just begun.

Those emails began to appear Friday afternoon, just hours after the director of National Intelligence and the Department of Homeland Security issued a statement attributing previous hacks to the Russian government. Officials said Wednesday that it may take weeks to establish whether Podesta’s emails were also hacked by the Russians — though they said the attack on his Gmail account fits the pattern of previous, Russian-sponsored email thefts.

Republicans have previously condemned WikiLeaks and similarly blasted the leaks by Edward J. Snowden, a National Security Agency contractor, and said they were evidence of carelessness by the Obama administration.

When Snowden’s disclosures about the scope of the NSA spying were brought to light, it touched off a feverish debate over government invading people’s privacy, and many Republicans denounced Snowden as a traitor. The emails from Podesta were also the result of an illegal hack — but of a private email account or campaign emails, not a government agency.

Also Read: Multiple women claim Donald Trump groped them as campaign crisis deepens

Among the Trump supporters who have most vocally praised WikiLeaks is Sean Hannity, the Fox News host who excoriated the site’s editor, Julian Assange, years ago.

Rep. Peter T. King, R-N.Y., who supports Trump, said he would not go as far as Hannity had in “rehabilitating Assange." Then, conflating the WikiLeaks disclosures with the Snowden disclosures, he added that: “I thought what Snowden did was disgraceful, treasonous. But the reality is the information is out there, and if Hillary doesn’t deny it then to me it certainly has to be used." Rudolph W. Giuliani, the former New York City mayor and Trump supporter, said that Democrats showed no compunction about using unauthorized material when it came to Trump’s 1995 tax returns, or a leaked NBC audio recording of Trump boasting about groping. Trump’s campaign manager, Kellyanne Conway, insisted on Wednesday that the information that WikiLeaks and other outlets had made public from hacking collectives is “relevant."

While some Republican strategists questioned the manoeuvre by Trump, the Clinton campaign seemed uncertain about how to navigate the disclosures, particularly after calling attention to the unauthorized disclosures of pages of Trump’s tax returns in The New York Times and an 11-year-old tape featuring the candidate bragging about forcing himself on women. For the most part, the Clinton team repeatedly criticized news organizations for using hacked materials. But privately, Democrats expressed deep concern about how much more widespread the breaches could be.

Also Read: Donald Trump’s attacks on GOP leaders ignite civil war inside party

Counting on a so-called “October surprise" bombshell has never been a winning gambit for a struggling presidential nominee, and Republican pollsters say that the WikiLeaks email will do little to help Trump attract more undecided voters, especially women, or reassure wavering Trump supporters. More than anything, pollsters say, the emails will merely reinforce the views of relatively narrow numbers of people who are intensely suspicious of government. “Trump has a hard-core base," said Neil Newhouse, a Republican pollster. “They ought to spend less time figuring out how to reinforce those people and more time trying to add to his vote column." ©2016/The New York Times