Three weeks after Election Day 2016, the Kremlin officially floated a theory that would ultimately lead to only the third presidential impeachment in U.S. history.

“Ukraine seriously complicated the work of Trump’s election by planting information” aimed at damaging his campaign chairman Paul Manafort, a spokeswoman for Russia’s Foreign Ministry told reporters on Nov. 30, 2016, accusing the Ukrainian government of scheming to help elect Hillary Clinton.

President-elect Donald Trump by this time was busy staffing up his incoming administration, and some of his top advisers, including his son-in-law Jared Kushner and incoming national security adviser Michael Flynn, were making overtures to Russia’s ambassador in the hopes of establishing a diplomatic backchannel to Moscow.

But as Trump himself would later complain, spokeswoman Maria Zakharova noted in her Nov. 30 briefing that a smattering of Ukrainian officials had criticized him during the campaign.

“You probably remember that Ukrainian officials and diplomatic representatives abroad did not express their views or political assessments but openly insulted the person whom the American people elected their president. You may remember that they later tried to delete these statements from their social networks accounts and their sites, saying that they had been wrong and had rushed to conclusions,” she said.

But that effort to shift blame may have started months earlier.

Zakharova’s claims seemed easy enough to shrug off at the time. It was not surprising that the Kremlin, highly skilled in the dark arts of dezinformatsiya, would try to shift blame to its adversaries in Kyiv.

But that effort to shift blame may have started months earlier. A review of Russian state media reports from the time and interviews with a dozen current and former officials and experts in Kyiv and Washington paint a more sinister picture: that Zakharova’s seemingly throwaway accusation was actually the culmination of a year-long effort to frame Ukraine for a Russian attack, ultimately leading to parallel efforts by Moscow and President Donald Trump to try to game the 2020 election by seeking dirt on former vice president Joe Biden.

Trump’s quest to absolve himself of the accusation that he cheated to win in 2016 would ironically culminate in his impeachment for what Democrats say are his attempts to cheat to win in 2020. As the Senate deliberates the president’s fate, Democrats see an “ongoing pattern of misconduct” that shows he is “an immediate threat to the nation and the rule of law.”

Cindy Otis, a former political and military analyst at the CIA who now leads the disinformation analysis program at Nisos, a cyber security firm, says that Moscow may even have planted the seeds even earlier than Zakharova’s news conference.

“There’s been an evolution of the main narrative” tying Ukraine to the 2016 election, Otis said. She pointed to a March 2015 article in the Kremlin-funded outlet Russia Today that tried to connect former Secretary of State Hillary Clinton, the future Democratic presidential nominee, to the popular uprising against the pro-Russian Ukrainian president Viktor Yanukovych in 2013.

“The Russian narrative in 2015-2016 was that Clinton interfered in Ukraine, and that her campaign was being directed or driven by Ukrainian oligarchs,” Otis said.

As is typical of Russia’s disinformation operations, it hinged on a kernel of truth—the reports cited donations her charity had received from Ukrainian oligarch Viktor Pinchuk beginning in 2008, which were initially reported by the Wall Street Journal.

“They really seized on that Wall Street Journal article,” Otis said, pointing to a chart included in the article listing “Ukraine” as the Clinton Foundation’s top donor that was widely shared by suspected Russian trolls and the far-right on social media.

But it wasn’t just isolated accounts accusing Ukraine of manipulating the 2016 election; lawmakers say they’ve seen signs of an organized, top-down effort directed by the Kremlin to create a false narrative and exonerate Russia.

“Trying to blame Ukraine for the interference is not inconsistent with Russian disinformation active measures,” said Sen. Angus King, a member of the Senate Intelligence Committee who aligns with Democrats, said in an interview last month. “This is consistent with the Russian playbook.”

The theory that Ukraine was responsible for the DNC hack was first floated by Trump’s own campaign chairman, Paul Manafort.

That initial disinformation effort failed to catch fire, but it solidified a Clinton-Ukraine connection among some on the political fringes—the RT story was posted dozens of times in far-right, pro-Trump, and pro-Bernie Sanders Facebook groups between 2015 and 2019—and set the stage for another Russia-promoted conspiracy theory that continues to be amplified by Trump: that the Ukrainians hacked the Democratic National Committee with the help of a cybersecurity firm, CrowdStrike, and framed Russia.

The theory that Ukraine was responsible for the DNC hack was first floated by Trump’s own campaign chairman, Paul Manafort, recently released documents from special counsel Robert Mueller’s investigation show.

According to Trump’s deputy campaign chairman Rick Gates, the idea was seeded by Manafort’s business partner in Ukraine, a dual Russian-Ukrainian citizen named Konstantin Kilimnik who U.S. officials have linked to Russian intelligence. Manafort had worked with Kilimnik for years in Ukraine to prop up the country’s pro-Russia politicians, including the ousted Ukrainian President Viktor Yanukovych.

“Gates recalled Manafort saying the hack was likely carried out by the Ukrainians, not the Russians, which parroted a narrative Kilimnik often supported,” reads a memo summarizing an April 2018 FBI interview with Gates, who cooperated with federal prosecutors and testified against Manafort in exchange for a more lenient sentence.

It’s not clear whether Trump was aware of Manafort’s alleged claims. During the campaign, the candidate largely cast doubt on Moscow’s meddling, the full extent of which was not yet known.

“I don't think anybody knows it was Russia that broke into the DNC,” Trump said at the first presidential debate on Sept. 26, 2016. “I mean, it could be Russia, but it could also be China. It could also be lots of other people. It also could be somebody sitting on their bed that weighs 400 pounds, OK? You don’t know who broke into DNC.”

In January 2017, however, when POLITICO published a story titled “Ukrainian efforts to sabotage Trump backfire,” some of Trump’s allies seized on elements of the reporting— sporadic criticism of the Republican candidate by Ukrainian officials and meetings with a DNC consultant—while ignoring the caveat that the investigation found “little evidence of such a top-down effort by Ukraine.”

Once he was sworn in, Trump had unfettered access to the unclassified intelligence that informed the intelligence community’s conclusion that Russia hacked the DNC and interfered to help him win. But he still refused to believe it, preferring the unsubstantiated rumors about Ukraine’s attempts to sabotage his candidacy.

“He would almost never not bring it up,” one former White House official said of Trump’s fixation with the Ukraine conspiracy theory. “And that certainly continued the whole time I was there. It was Ukraine, Ukraine, Ukraine. You just couldn’t make him understand that’s not how it turned out.”

Suspicion of Ukraine already ran deep among some of Trump’s top advisers, according to another former White House official. “Steve Bannon and Stephen Miller had an enormous amount of distrust and suspicion toward Ukraine,” the former official said, and thought the Ukrainians were trying to get the U.S. to be more adversarial toward Russia.

“I thought it was odd, because it seemed obvious that Ukraine was someone we needed to be closely allied with,” this former official said.

The origins of Giuliani’s private investigation are murky.

Early on in his presidency, Trump went as far as to ask the Justice Department, then helmed by Jeff Sessions, to investigate the issue of Ukrainian interference on several occasions, the formal official said. But DOJ would always decline, this person added, “because their sense was that Mueller was going to do it for them.” A DOJ spokesperson did not respond to a request for comment.

It would fall to Trump’s personal lawyer, Rudy Giuliani, to seek evidence implicating Ukraine in 2016 election meddling—a quixotic mission fueled by his client’s insistence on complete exoneration as his own administration deepened its probe into Russia’s very real involvement.

The origins of Giuliani’s private investigation are murky. David Ignatius, the Washington Post columnist, has pointed to June 2017 as the date when the former New York mayor traveled to Kyiv to meet with then-president Petro Poroshenko, who was scrambling to establish ties to the new U.S. president. There, Giuliani also met with Yuriy Lutsenko, the prosecutor who would later level various unsubstantiated corruption allegations against the Bidens.

For his part, Giuliani has described his efforts as an attempt to prove that Democrats “framed” Trump with the help of Poroshenko’s government, which both deny. “The collusion that they claim happened in Russia happened in the Ukraine with Hillary Clinton,” Giuliani has said.

It was clear to many government officials early on, however, that the theory was rooted in Russian disinformation and could even be part of an intelligence operation, said another person close to the White House. And intelligence officials have since briefed lawmakers on their belief that the theory is Russian propaganda, according to a person familiar with the briefings.

But Trump’s advisers soon gave up on trying to convince him of Russia’s role, said the first former official.

“Anything he associated with the intel community, he rejected pretty much out of hand because his sense was that the ‘Deep State’ had decided in some star chamber or secret meeting that they would feed intelligence to him that would cause him to make mistakes, and disprove a lot of his theories about what happened in the election,” the person said.

By March 2019, Trump was tweeting out headlines like “As Russia Collusion fades, Ukrainian plot to help Clinton emerges." Privately, he railed about Ukraine to U.S. diplomats, who were trying to arrange a meeting with Volodymyr Zelensky, the country's new president. "They tried to take me down," he said at one point.

Trump evidently never let it go: In the infamous phone call with Zelensky last July that became central to his impeachment, the president asked Zelensky to work with Attorney General Bill Barr to “get to the bottom” of Ukraine’s supposed interference in 2016. (When the record of the call went public, the Justice Department swiftly denied any involvement on Barr’s part.)

The January 2017 POLITICO article has been cited repeatedly by GOP lawmakers throughout the impeachment inquiry as evidence that Kyiv meddled in 2016 using DNC consultant Alexandra Chalupa as an intermediary—much to the chagrin of Fiona Hill, a Russia expert who served on Trump’s National Security Council until July 2019.

Hill accused Republican lawmakers citing the story of emboldening Moscow by pushing a “fictional narrative.”

In her public impeachment hearing last November, Hill accused Republican lawmakers citing the story of emboldening Moscow by pushing a “fictional narrative” that Ukraine interfered in 2016, though she acknowledged that certain Ukrainian officials were critical of Trump during the campaign.

“In the course of this investigation, I would ask that you please not promote politically driven falsehoods that so clearly advance Russian interests,” Hill said.

Daria Kaleniuk, executive director of the Ukraine Anti-Corruption Action Center (AntAC), said that Giuliani’s claims about the Bidens were part of a larger disinformation campaign “that was orchestrated years in advance.”

“It has been clear from Day 1 that the target audience of this campaign is not Ukraine — it’s America,” said Kaleniuk. “The goal has been to turn the U.S. establishment against us, making them believe that we are bad. Corrupt people are presented as heroes. And the ultimate winner is Russia.”

If so, the strategy has worked better than the Kremlin could possibly have imagined, with Americans sharply polarized over impeachment and aid to Ukraine now a partisan issue in U.S. politics.

In that post-election news conference in 2016, Zakharova, the Foreign Ministry spokeswoman, said something that sounds eerily prophetic in hindsight.

“The Ukrainian authorities’ attempt to play the victim is an old trick,” she said, “which usually brings good dividends.”

Daniel Lippman contributed to this report.