Prior to the November presidential vote, Newsweek published an article revealing the scope, intent, mechanisms and global impact of Russia’s interference with the American election, based largely on information from European intelligence services. Given the recent release of declassified government documents confirming large portions of the original article, we are combining new reporting with extensive information from the first Newsweek piece that has yet to be declassified and has been described by individuals from and connected to several foreign intelligence services who spoke on the condition of anonymity.

At the Kremlin last August, officials began to worry that they had committed a massive blunder. Donald Trump, they feared, was psychologically unstable.

Moscow’s hacking and disinformation campaign, designed to interfere with the American election, had been underway for months. In a series of operations overseen by Dmitry Peskov, the Kremlin spokesman, Russia had engaged in similar interference in the Netherlands, Estonia, Germany, Britain and other nations with mixed success. But by late July, some Russian officials believed Peskov’s work had gone too far. Sergei Ivanov, the chief of staff for the presidential executive office in the Kremlin, was furious at what he saw as a botched and ill-conceived attempt to use hacking and disinformation to interfere in a failed coup attempt in Turkey. As for the American effort, Ivanov and Dmitry Medvedev, the Russian prime minister, had grown increasingly afraid of a backlash as news articles appeared implying that Russia had been trying to split the supporters of Democrats Bernie Sanders and Hillary Clinton while building up Republican Donald Trump. Still, Vladimir Putin, the Russian president, had remained pleased with Moscow’s progress. Even Ivanov expressed his belief that, while Washington had failed to split the Russian elite with sanctions over its invasion of Ukraine, the cyberattacks had created political division in the U.S.

Related: Russian hackers claim to have sensitive information on Trump

Then came the Democratic National Convention, and the appearance of Khizr and Ghazala Khan, parents of an Army captain who had died in the Iraq war. While the father, Khizr, gave a powerful speech condemning Trump, few could have expected the Republican nominee to spend days drawing attention to it. On Twitter and in public comments, again and again, the GOP nominee attacked the Khans, who—as parents who lost a son in war—were traditionally considered off-limits from criticism by politicians. But Trump would not let it go.

The inexplicable behavior led top Russian officials to believe that Trump would be forced to withdraw from the race because of his mental state and apparent unsuitability to be president, according to information obtained by a Western intelligence service. In particular, Kremlin officials feared they could not predict what the impact on Russia would be should Trump step aside. As a result, Moscow decided to stop forwarding documents obtained by its hackers through channels to WikiLeaks, which had been disseminating the records publicly.

Still, some material was already being passed from cutout-to-cutout on its way to WikiLeaks, and Russian officials feared that intervening to stop the flow of records might provide more evidence of their involvement.

About that time, according to reports obtained by Western intelligence, a Trump associate met with a pro-Putin member of Russian parliament at a building in Eastern Europe maintained by Rossotrudnichestvo, an agency under the Ministry of Foreign Affairs that is charged with administering language, education and support programs for civilians. While Newsweek could not determine the purpose of the meeting, a Western intelligence official said that surveillance of the meeting was conducted by or on behalf of the Estonian Information Board (EIB), the foreign intelligence service of Estonia. (Last year, EIB advised government leaders that the Russian government posed the greatest near-term danger to the security of Estonia, Lithuania and Latvia. As a result, Trump’s apparent support for Putin during the campaign raised concerns within the Baltic governments that, with a Trump presidency, they would face increased national security threats from Russia.) However, no evidence has emerged that Trump knew of the meeting or was briefed about it afterward.

By that time, however, the internal controversy at the Kremlin over the cyberattacks and disinformation campaign had taken its toll. On August 12, Ivanov—a close ally of Putin for decades and the staunchest critic of the hacking and disinformation program—was forced out of office by the Russian strongman and replaced by Anton Vaino, who had been the deputy chief of staff.

But suggestions of possible Russian interference flared up in the United States. Two days after Ivanov stepped down, The New York Times reported that Paul Manafort, then Trump’s campaign manager, may have illegally received $12.7 million from Ukrainian President Viktor Yanukovych’s Party of Regions; Manafort has denied any wrongdoing, and his lawyer, Richard Hibey, said his client never received any such payments. Manafort resigned from the Trump campaign not long after the article ran. According to information obtained from inside Russia by Western intelligence, Putin later met with Yanukovych in secret near the city of Volgograd. Yanukovych assured Putin there was no documentary trail showing payments to Manafort, although Putin told associates he did not believe the Ukrainian president, according to the information obtained by the Western intelligence source. (The Trump campaign never responded to any of the issues raised in the original Newsweek article. The transition team did not respond to an email on Tuesday evening regarding this update.)

On October 7, the Obama administration finally said publicly that it was aware of the Russian campaign. “These thefts and disclosures are intended to interfere with the U.S. election process,” Jeh Johnson, the secretary of homeland security, and James Clapper, the director of national intelligence, said in a statement. “We believe, based on the scope and sensitivity of these efforts, that only Russia’s senior-most officials could have authorized these activities.” The White House stated that President Barack Obama was considering a “proportional response”—a statement that suggested the United States would be launching cyberattacks against Russia.

About that time, “buyer’s remorse” had set in at the Kremlin, according to a report obtained by Western counterintelligence. Russia came to see Trump as too unpredictable and feared that, should he win, the Kremlin would not be able to rely on him or even anticipate his actions.

It appears the controversy regarding Trump’s ties to Russia could continue for a long time to come. The New York Times and other outlets reported on Tuesday that Trump and Obama had been presented with unsubstantiated reports that Russia had gathered salacious information about Trump. (The president-elect appeared to be referring to the media reports on Tuesday when he tweeted: “FAKE NEWS – A TOTAL POLITICAL WITCH HUNT!”) Large portions of the documents, which were assembled by political operatives attempting to thwart Trump’s march to the White House, could not be confirmed by Newsweek or other outlets. However, a Western European official who currently works for an intelligence agency said that the Kremlin had assembled a dossier of information about Trump during his visits to Moscow years ago, which included video and audio recordings. Newsweek could not determine if there was anything compromising in those records.

While there was widespread agreement among Western European and American intelligence agencies about the Russian effort—it was the British who first alerted the United States to its scope—there remain subtle disagreements regarding its intent. Over many weeks of debate, American intelligence agencies concluded that the campaign, which they believe was authorized by Putin, was intended to help Trump become president. Some Western European intelligence officials instead believe the Kremlin’s efforts were motivated not to support Trump, but to hurt Hillary Clinton, the Democratic nominee. Some of these overseas agencies also believe the effort was not set in motion by Putin, but received his support once underway. During Clinton’s time as secretary of state, Putin publicly accused her of interfering in Moscow’s affairs. For example, her statement that Russian parliamentary elections in December 2011 were “neither free nor fair” infuriated him.

The hacking campaign, according to this analysis, was designed to split the Democratic Party so that as president, Clinton would have to spend enormous amounts of time dealing with domestic discord driven by Republicans and progressives tricked into believing that the Democratic National Committee had rigged her nomination. For example, as part of the campaign, Russian hackers obtained emails from the DNC that were then sliced into small bits and put out on the internet through participants in the propaganda effort. In many of these instances, the real documents were misrepresented. For example, WikiLeaks released a number of May 2016 emails on the eve of the Democratic convention that made it appear as if the DNC was solely pulling for Clinton; in many online postings, the date was removed so readers would have no idea unless they searched for the original document that was written at a time when Sanders could not possibly have won the nomination.

Either way, some Western European intelligence agencies have concluded, Putin’s larger goal is to damage NATO so the allied nations would be less likely to interfere in Russia’s domestic affairs and less capable of responding to the Kremlin’s military campaigns or cyberattacks on neighboring nations.

The American and Western European intelligence agencies do, however, agree on how the campaign worked: Hackers pilfered information from a variety of organizations both inside and outside Western governments; they distributed it to individuals who fed it into what a source told a European intelligence expert was a “pipeline.” This so-called pipeline involved multiple steps before the hacked information was disclosed by a large group of propagandists around the world on social media—in comments sections of websites and other locations online. For example, that source reported that documents in the United States intended to disrupt the American election are distributed through WikiLeaks. However, there are so many layers of individuals between the hackers and that organization that there is a strong possibility WikiLeaks does not know with certainty the ultimate source of these records.

The Russian penetration in the United States is far more extensive than has been revealed publicly, although most of it has been targeted either at government departments or nongovernment organizations connected to the Democratic Party. Russian hackers penetrated the White House, the Joint Chiefs of Staff and the State Department. They also struck at organizations with looser ties to the Democratic Party, including think tanks such as the Brookings Institution, where some of Clinton’s longtime friends and colleagues work, as well as some organizations connected to the Republican National Committee.

While the campaign has disturbed Western nations around the globe, American allies have been dumbstruck by Trump’s response, not only after the election but during the campaign. A Western European intelligence official said that he had been informed Trump was briefed on the Russian campaign while he was a candidate; moreover, the allies believed he had to have been aware of the public statements in early October by top American intelligence officials and the Obama administration about Moscow’s interference.

Yet Trump continued to dismiss the evidence and instead came to the Kremlin’s defense. Intelligence and other government officials in Britain were horrified, according to one person with direct knowledge of the reaction there. In the course of one of the presidential debates, Trump attacked Clinton for saying that 17 American intelligence agencies had concluded Russia was interfering with the election. Trump stated that “our country has no idea” about Russian hacking. But all of the NATO allies were convinced Russia was behind it. All of America’s intelligence agencies were too. The foreign intelligence services had been sharing what they knew about this with the Americans, and Trump had been told about it. But he blithely dismissed their conclusions.

“A lot of people are now trying to connect the dots of all the data [in the intelligence files] to try and understand Trump,” says one former British official who has spoken to numerous members of the government about Trump’s comments in that debate. “There certainly are a lot of conspiracy theories being bandied about, but no question there is a lot of concern about what’s going on in Trump’s head…and whether we would be able to work with him.”

Even as Trump was disputing the role played by the Kremlin in the hacking, his campaign was scouring sites publicly identified by American intelligence as sources for Russian propaganda. Ten days before the third debate, Newsweek published an article exposing how Trump had cited—as fact—a document altered by Russian propagandists and put out on the internet, suggesting (erroneously) that Clinton’s closest allies believed she bore responsibility for the attack on the American mission in Benghazi, Libya.

Sputnik, which has been publicly identified by intelligence agencies as a key disinformation site of the Kremlin, published an article citing the document. The site, which later took down the article, published another one attacking Newsweek and essentially denying the news organization was controlled by the Kremlin. Before the day was out, the Trump campaign was emailing links of that article to multiple reporters, including at publications like The Daily Caller, urging them to pursue the story.

Officials in Western Europe say they are so dismayed, they now feel compelled to gather intelligence on a man who is set to become the next president of the United States. According to a Western intelligence source, at least one allied nation is currently conducting intelligence operations in the United States, collecting details on officials surrounding Trump and executives in his company, the Trump Organization; the source, who works in government, expressed disbelief that such an effort had been deemed essential.

Moscow is seen as a direct threat to the interests of NATO and other American allies—both in its aggressive efforts to reshape global alliances and for its power to damage Western Europe, which obtains almost 40 percent of its natural gas from Russia. Should the United States, the last remaining superpower, tilt its policies away from NATO to the benefit of Russia, the alliance between America and Western Europe could be transformed in unprecedented ways. And so, for perhaps the first time since World War II, countries in Western Europe fear that the American election of Trump could trigger events that imperil their national security and irreparably harm the alliances that have kept the continent safe for decades.