Rod J. Rosenstein, then the deputy attorney general, speaks during his farewell ceremony Thursday at the Justice Department. (Erik S Lesser/EPA-EFE/Shutterstock)

Former deputy attorney general Rod J. Rosenstein on Monday defended his role in the firing of James B. Comey from the FBI and criticized the bureau’s former director as a “partisan pundit” — offering one of his most detailed public accounts of the hectic events that led to the appointment of Robert S. Mueller III as special counsel.

Speaking to the Greater Baltimore Committee just days after stepping down as the Justice Department’s No. 2 official, Rosenstein fired back at criticism that he acted inappropriately for President Trump and sought to present his legacy as one of an official who was thrust into a political maelstrom and did what he thought was right.

At Trump’s request, Rosenstein wrote a memo supporting Comey’s dismissal in May 2017 and came under intense public criticism for doing so. Critics viewed the move as a way of obstructing the inquiry into Trump’s campaign.

In prepared remarks, Rosenstein seemed to minimize the effect Comey’s firing could have had on the inquiry. He said that when a White House lawyer first told him Trump had decided to fire Comey, “Nobody said that the removal was intended to influence the course of my Russia investigation.”

“I would never have allowed anyone to interfere with the investigation,” he asserted, though he conceded later that he “recognized that the unusual circumstances of the firing and the ensuing developments would give reasonable people cause to speculate about the credibility of the investigation.”

After Comey’s firing, the FBI began investigating whether Trump had sought to obstruct justice, and Rosenstein ultimately appointed Mueller to oversee that. Mueller asserted in his final report that Trump told Rosenstein to mention in his memo that Comey had told the president three times he was not personally under investigation in the Russia case. Rosenstein did not do so.

Some legal analysts have said Rosenstein should have recused himself from the case, though a Justice Department spokeswoman said he was cleared to supervise it by career ethics officials.

In his prepared remarks, Rosenstein said that Trump “did not tell me what reasons to put in my memo,” but noted what the special counsel report had said. He said he did not include what Trump wanted because it was not relevant, and he did not have personal knowledge of what Comey had told Trump.

Rosenstein said he “did not dislike” Comey but that Comey took steps that were “not within the range of reasonable decisions” during the investigation of Hillary Clinton’s use of a private email server. Rosenstein suggested that if he — rather than Trump — had been in charge, “the removal would have been handled very differently, with far more respect and far less drama.”

“If I had been asked to make a recommendation before the removal decision was made, I would have included a more balanced analysis of the pros and cons,” he said. “But my brief memo to the attorney general is correct, and it was reasonable under the circumstances.”

Rosenstein made clear, too, that he has been distressed by Comey’s recent commentary about him. He referred to a New York Times op-ed in which Comey suggested that Rosenstein and Attorney General William P. Barr had allowed their souls to be consumed by Trump.

“But now the former director is a partisan pundit, selling books and earning speaking fees while speculating about the strength of my character and the fate of my immortal soul,” Rosenstein said. “That is disappointing. Speculating about souls is not a job for police and prosecutors.”

Rosenstein, who said he generally disfavors special counsels, also defended his appointment of Mueller. He said there was “overwhelming evidence” of Russian hacking and efforts on social media to influence the 2016 presidential election, and that the investigation was “justified.”

“I determined that I needed a special counsel to help resolve the election interference investigation in a way that would best protect America from foreign adversaries and preserve public confidence in the long run,” he said. “I knew that some people would not be happy about it. I knew that it would be unpleasant for me and my family.

Rosenstein said he felt he had “made the right decision.”

“My soul and character are pretty much the same today as they were two years ago,” he said. “I took a few hits and made some enemies during my time in the arena, but I held my ground and made a lot of friends.”