A veteran of the federal prosecutor’s office in Manhattan, Mr. O’Callaghan was part of a team that investigated the terrorists behind the Sept. 11, 2001, attacks.

He left the government in 2008 to become a defense lawyer and went on to work on John McCain’s presidential campaign that year. Mr. O’Callaghan was dispatched to Alaska, where he led a team that defended Sarah Palin, Mr. McCain’s running mate, from accusations that she had pushed an Alaskan official to fire a state trooper who was involved in a bitter divorce from her sister.

Mr. O’Callaghan returned to the Justice Department in 2017 as the head of the national security division, and in April 2018, he moved to the deputy attorney general’s office, which essentially runs the department’s day-to-day functions and oversees all United States attorneys’ offices. He worked behind the scenes, holding one of the department’s most powerful positions and advising the deputy attorney general on the department’s biggest investigations and most delicate policy matters.

Mr. O’Callaghan began working closely with Mr. Rosenstein nearly a year after Mr. Mueller took over the Russia inquiry into whether the Trump campaign had conspired with Russia to interfere in the 2016 election. The sensitivities around that inquiry became even more heightened as Mr. Mueller’s team began to consider whether Mr. Trump himself had tried to obstruct the investigation.

Mr. Mueller ultimately said that he had “insufficient evidence” to determine whether the Trump campaign engaged in a criminal conspiracy with the Russians, even though the campaign expected to benefit from the sabotage. The special counsel did not draw any conclusions about whether Mr. Trump obstructed justice, leaving room for Mr. Barr to clear the president of that crime.