It seems increasingly clear that former New York mayor Rudolph W. Giuliani’s new role as defender of President Trump may be more significant in a public relations sense than a legal one. Giuliani is an experienced lawyer, and he may be providing specific guidance to Trump behind the scenes, but his forays into the media have been a prominent effort to shape the boundaries of the investigation from a political perspective. Trump sees the investigation as invalid, and Giuliani is doing everything he can to bolster that point of view.

On Friday, that effort involved a conversation with the Associated Press’s Jonathan Lemire and Eric Tucker.

“If the spying was inappropriate, that means we may have an entirely illegitimate investigation,” Giuliani said, referring to Trump’s allegation that information provided by a Britain-based informant constituted “spying.” “Coupled with Comey’s illegally leaked memos,” he added, “this means the whole thing was a mistake and should never have happened.”

This point about the genesis of the investigation into possible ties between the Russian government and Trump’s 2016 campaign has been recurrent. Over and over, different things have been posited as the true genesis of the investigation, generally because those things are presented as disqualifying in the way that Giuliani appears to be ready to argue.

It raises an interesting question, though: What was the genesis for the investigation into possible ties between the campaign and Russia? What’s more, is that even the proper way to ask the question?

October 2016? Let’s work backward. Earlier this year, there was a political fight over a memo prepared by a staffer for Rep. Devin Nunes (R-Calif.) which argued that an application for a warrant to surveil Trump campaign adviser Carter Page was based on politically biased information. That information came from what’s generally referred to as the “dossier,” a collection of reports written by former British intelligence officer Christopher Steele on behalf of the firm Fusion GPS, which was being paid to dig into Trump’s business ties by a law firm working for the Democratic National Committee and the campaign of presidential candidate Hillary Clinton.

When Nunes’s memo was released, it was quickly undercut by a competing memo from Democrats on the House Intelligence Committee and by outside observers. Setting aside those concerns, it’s clear that the warrant wasn’t the origination of the Russia investigation. The Nunes memo makes clear that an investigation into Russia’s interaction with the campaign had begun before that warrant being granted in October 2016.

July 2016? “The Papadopoulos information triggered the opening of an FBI counterintelligence investigation in late July 2016 by FBI agent Pete Strzok,” the memo reads, referring to information the FBI received focused on another Trump campaign adviser, George Papadopoulos. That information, it seems, was a tip from the Australian government that one of its diplomats, Alexander Downer, had been in contact with Papadopoulos in May. Over drinks in London, Papadopoulos allegedly told Downer that he’d been told the Russians had collected emails incriminating Clinton. When WikiLeaks began releasing emails stolen from the DNC in late July 2016, the Australians informed the American government about what Papadopoulos had said.

An investigation was launched on July 31, according to the Democratic response to the Nunes memo. The New York Times reported earlier this month that the investigation was code-named “Crossfire Hurricane.” According to various reports, including the Times’s, Papadopoulos was one of at least four people involved with Trump’s campaign who were at some point investigated by the FBI. The others were Trump’s eventual national security adviser Michael Flynn, campaign chairman Paul Manafort and Page.

Now we come to the “spy” claim that has been the focus of recent attention by the president and Giuliani. It’s a reference to outreach by an informant named Stefan Halper, a professor emeritus at the University of Cambridge. In 2016, he reached out to both Page and Papadopoulos, apparently prying them for information about any contacts with the Russian government.

His conversation with Papadopoulos, though, occurred in September, well after it’s understood that the FBI started looking at Papadopoulos’s contacts. Halper spoke with Page in mid-July 2016, before “Crossfire Hurricane” launched and shortly after Page had returned from a speaking engagement in Moscow. Was that the origin of the investigation?

March 2016? Probably not. We know from the Democratic memo that the FBI talked to Page about possible contacts with the Russian government in March 2016 — even before Papadopoulos was told about the emails and the same month that Page was named as an adviser to the Trump campaign. Page had been on the FBI’s radar since 2013, when the agency obtained a recording of a Russian agent who had mentioned targeting Page as a potential Russian asset. Whether there was an active FBI investigation into Page in March 2016 isn’t clear.

It’s unclear, too, if there were multiple investigations into the four Trump-campaign related individuals that eventually merged into one investigation or if they all began formally in late July. The nature of the investigation toward the end of the campaign isn’t clear, either: Was it an investigation into the campaign broadly or into those four individuals?

Late 2015? The Guardian reported in April of last year that foreign intelligence agencies — including the British GCHQ — had begun to gather suspicious communications between “figures connected to Trump and known or suspected Russian agents” beginning in late 2015. Those communications were shared with American intelligence agencies into mid-2016. At the Observer, former NSA analyst John Schindler explored the question of when the investigation began and points to those communications as being the possible original trigger for its investigations.

But who could those “figures” have been? None of the four people under investigation by the FBI were associated with the campaign in late 2015. Flynn joined in February 2016; Manafort, Page and Papadopoulos in March. In December 2015 — a period that overlaps with the Guardian’s report — Flynn attended a dinner in Moscow for the Kremlin-backed media outlet RT. It’s not clear whether that raised red flags for American intelligence officials, but it seems possible that Flynn, the director of the Defense Intelligence Agency until August 2014, dining with Russian President Vladimir Putin might attract some interest.

When he first acknowledged the existence of the investigation during testimony before the House Intelligence Committee in March 2017, former FBI director James B. Comey said that it had begun in July of the year before. It’s possible that we’re conflating several things into one: The investigation into possible collusion triggered by the Papadopoulos news in July and separate investigations into people associated with the campaign that began at other points. It’s hard to say with certainty.

The trigger for Mueller’s investigation was an order from Deputy Attorney General Rod J. Rosenstein signed in May of last year. It specifically authorizes Mueller to pick up the investigation referenced by Comey in March 2016, an investigation that at the time Mueller took it over was a bit under 10 months old (“a fairly short period of time” for a counterintelligence investigation, Comey told the House committee).

Giuliani’s claim that Mueller’s probe was predicated on biased or improper information cherry-picks particular points of complaint with the obvious goal of smearing the entire effort to figure out what contacts might have existed as politically biased. Memos shared with a friend by Comey to tip off the Times about his conversations with Trump had nothing to do with the existence of what Mueller was investigating. In fact, it seems clear that Mueller’s appointment was an effort to protect the investigation from political interference, given what Comey alleged he had been told by Trump. Take out that concern about interference, and the investigation would still have moved forward within the FBI.

The full nature of the investigation or investigations isn’t clear, for obvious reasons. What is clear is that the public explanation of the main effort to determine if there were contacts between Trump’s campaign and Russian actors predates Mueller and is derived to some substantial degree from what Papadopoulos told Downer in May 2016 — a year before Mueller joined the effort.

Meaning that it is also clear that Giuliani’s presentation of the genesis for the investigation is obviously flawed.