As federal prosecutors in Manhattan gathered evidence late last year about President Trump’s role in silencing women with hush payments during the 2016 campaign, Mr. Trump called Matthew G. Whitaker, his newly installed attorney general, with a question. He asked whether Geoffrey S. Berman, the United States attorney for the Southern District of New York and a Trump ally, could be put in charge of the widening investigation, according to several American officials with direct knowledge of the call.

Mr. Whitaker, who had privately told associates that part of his role at the Justice Department was to “jump on a grenade” for the president, knew he could not put Mr. Berman in charge, since Mr. Berman had already recused himself from the investigation. The president soon soured on Mr. Whitaker, as he often does with his aides, and complained about his inability to pull levers at the Justice Department that could make the president’s many legal problems go away.