Former top FBI lawyer James Baker offered a robust defense Friday of the bureau’s investigation into President Trump and his 2016 campaign, taking aim at Trump’s allegation that the inquiry was tantamount to a coup and describing how he sought to ensure agents’ work was on solid legal footing.

“There was no attempted coup,” Baker said bluntly. “There was no way in hell that I was going to allow some coup or coup attempt to take place on my watch.”

The comments, which came at a taping of the Lawfare podcast in front of a live audience at the Brookings Institution, were Baker’s first public remarks on the investigation that would eventually be taken over by special counsel Robert S. Mueller III. Baker had addressed questions about the probe previously only in private sessions with congressional committees, though transcripts of those comments were later released.

Baker, who was interviewed by Lawfare editor in chief Ben Wittes, said he was motivated to talk because he “just became sick of all the BS that is said about the origins of the investigation,” and he wanted to “reassure the American people that it was done for lawful, legitimate reason.”

The Justice Department inspector general is investigating the handling of various aspects of the Russia case, and Attorney General William P. Barr has said he will conduct a separate review. Barr recently alleged that government “spying” occurred on the Trump campaign, and while he has insisted he did not mean to imply wrongdoing, critics note that his language mirrors the president’s attacks on the bureau and its investigation. Baker was the FBI’s general counsel when the Russia probe was initiated and when Mueller took over. He was reassigned from the top legal post in December 2017 after he got caught up in an FBI leak probe, and he confirmed Friday the case is ongoing.

He said he talked with investigators for “many hours,” though those conversations happened a year and a half ago.

“I’m confident,” he said, “that I did nothing wrong.”

Friday’s interview was wide-ranging, focusing on Baker’s response to criticism the bureau has faced in recent months, as well as specific steps it took in investigating Trump. At times, it was also personal. Baker described how it was “extremely unnerving and weird” to be attacked by Trump on Twitter, and said that, after he left the FBI in 2018 and began searching for a job at a law firm or corporation, the tweets had a real impact.

A “couple” potential employers, Baker said, told him, “Jim, we like you. We’d be very interested in having you. You’re too controversial.” He said he ultimately got a job at the R Street Institute, a think tank.

Wittes and Baker also discussed the threat from Russia. Baker said the Kremlin is more interested in causing havoc in the United States than in helping any particular person and that the investigation of Russia’s activities has no end date.

“You shouldn’t assume they’re going to support Donald Trump the next time,” Baker said.

Baker said the investigation of possible ties between the Trump campaign and Russia began with a tip that was impossible to ignore. In summer 2016, he said, Australian officials relayed that George Papadopoulos, a foreign policy adviser to the Trump campaign, had boasted of having “dirt” on Hillary Clinton, Trump’s opponent, in the form of “thousands of emails.” Baker said that while the bureau is constantly investigating Russian activities in the United States, it had not — at least to his knowledge — been examining any Trump campaign advisers before that tip about Papadopoulos.

“That was the nugget of information that got everything going,” he said, adding later, “It would have been a dereliction of our duty not to investigate this information.”

Other top-level bureau officials from the time, including former director James B. Comey and former deputy director Andrew McCabe, have offered a similar account of events. As they have, Baker insisted the initial investigation was “not predicated” in any way on the controversial dossier — a collection of intelligence reports from a former British agent that the Clinton campaign hired through an opposition research firm to investigate Trump.

Conservatives have asserted that the dossier, which included a number of unconfirmed and, in some cases, salacious allegations about the president, infected the bureau’s work with politics and was used inappropriately to advance the investigation, especially when it was cited in applications to surreptitiously monitor Carter Page, another former Trump campaign adviser.

People familiar with the matter, who spoke on the condition of anonymity, have said the inspector general is especially interested in those applications to the Foreign Intelligence Surveillance Court and whether the bureau adequately documented credibility questions about the dossier’s author, Christopher Steele, when it cited his work as reason the bureau should be allowed to monitor Page. Barr has said the inspector general’s probe could be finished in May or June.

Baker insisted the bureau was aware of Steele’s motives but still had to check out his tip. He said he asked to review the application to monitor Page and was “comfortable” with it.

Baker similarly defended the FBI’s decisions in May 2017, when agents began investigating Trump for possible obstruction of justice in the wake of Comey’s firing. That probe was ultimately taken over by Mueller, who declined to say whether he believed Trump had obstructed justice but detailed episodes that hundreds of former federal prosecutors have asserted probably would have resulted in charges for anyone but the president.

Baker said he viewed Mueller’s findings as showing “a pattern of corruption.”

“Even if it’s not criminal, it should be unacceptable in America today,” he said.

Baker said he is unsure what the inspector general will ultimately conclude about the bureau’s work, though he asserted, “I’m sure they will find things that I didn’t know about at the time.”