Convinced that the deputy attorney general, Rod J. Rosenstein, was ready to resign after the revelation that he suggested President Trump was unfit for the job, senior White House aides got to work last weekend installing a replacement.
Matthew G. Whitaker, the chief of staff to Attorney General Jeff Sessions, would become the acting No. 2 official at the Justice Department, his White House counterpart, John F. Kelly, told him over the phone on Saturday morning, according to two people briefed on the call. To the White House, he was an obvious choice: a confident former college football player and United States attorney whom Mr. Kelly has privately described as the West Wing’s “eyes and ears” in a department the president has long considered at war with him.
By late Monday morning, the plan was moot. Mr. Rosenstein was no longer committed to resigning, at least without assurances he was doing so on amicable terms with the president. Mr. Trump told reporters on Wednesday that he was open to keeping Mr. Rosenstein in place, and two White House officials said they believed he was likely to remain in his job at least through the midterm elections.
But the arrangements to promote Mr. Whitaker show how White House aides seized on the days of uncertainty about Mr. Rosenstein to try to place a trusted loyalist at the top of a department whose traditional independence has long frustrated the president. Mr. Rosenstein has incurred Mr. Trump’s wrath because he appointed a special counsel for the Russia investigation, though thanks to complex department rules, Mr. Whitaker would not assume control of the inquiry if he ever replaces Mr. Rosenstein.
By contrast, Mr. Whitaker cuts the kind of central-casting figure whom Mr. Trump prefers, and he has served as what one White House aide called a “balm” on the relationship between the president and the Justice Department. He has frequently visited the Oval Office and is said to have an easy chemistry with Mr. Trump. On Monday morning, Mr. Trump himself called Mr. Whitaker, not with an explicit job offer but a reassurance that he has faith in him.
Administration officials have also mentioned Mr. Whitaker as a possible successor to Donald F. McGahn II, the White House counsel who plans to leave in the fall.
Justice Department and White House spokespeople declined to comment. The back-and-forth between the White House and Justice Department were described by more than a half-dozen administration officials and others briefed on the discussions who spoke on the condition of anonymity to describe internal conversations.
A native of Des Moines, Mr. Whitaker earned undergraduate, business and law school degrees from the University of Iowa, where he also played tight end for a Hawkeyes team that went to the Rose Bowl and once caught a touchdown pass on a faked field goal.
He went on to serve as United States attorney for the Southern District of Iowa from 2004 to 2009, and he ran unsuccessfully for Senate in 2014. Mr. Whitaker also has a connection to the evangelical voters who helped propel Mr. Trump to the White House — during his Senate campaign, Mr. Whitaker said at a forum for Republican candidates that if elected, he would ask judicial nominees whether they were “people of faith” who had “a biblical view of justice.”
Two months before Mr. Whitaker joined the Justice Department, he wrote in a column for CNN that the Trump family’s finances were beyond the scope of the investigation by the special counsel, Robert S. Mueller III, into whether any Trump associates conspired with Russia’s interference in the 2016 presidential election.
Should Mr. Mueller investigate the president or his family’s financial matters, “this would raise serious concerns that the special counsel’s investigation was a mere witch hunt,” Mr. Whitaker wrote, adopting the president’s derisive term for the investigation.
Leonard Leo, the influential head of the conservative legal organization the Federalist Society who has taken leaves from the role to periodically advise the president since the transition, recommended Mr. Whitaker for his job with Mr. Sessions, according to a person briefed on the job search.
Chiefs of staff to attorneys general typically interact frequently with the White House, but Mr. Whitaker’s assignment was particularly fraught, given the president’s verbal lashings of Mr. Sessions. But according to two White House officials, Mr. Trump took a liking to Mr. Whitaker, who has the sort of commanding bearing that the president likes.
Mr. Whitaker is skilled at cultivating allies, even in difficult situations, people close to him said. After he lost to Joni Ernst in a heated five-way Senate primary in 2014, Mr. Whitaker became one of her staunchest supporters and remains friendly with his former opponents.
“Matt can be competitive and then put it aside and build positive relationships,” said the Iowa state senator Jack Whitver, a Republican who worked at Mr. Whitaker’s law firm. “He works well with big personalities. He’s a good listener, which helps when everyone around him disagrees.”
In meetings in the Oval Office, West Wing officials said, Mr. Whitaker has spoken bluntly and authoritatively about prison overhaul, an issue embraced by Mr. Trump’s son-in-law and senior adviser, Jared Kushner. Mr. Whitaker has told the president that federal prosecutors would oppose some of the measures under discussion, according to a person familiar with the discussions.
Mr. Whitaker also took cues from Mr. Sessions, who has long understood where the department’s mission could align with Mr. Trump’s priorities, like on immigration and violent crime, according to a current Justice Department official who spoke on the condition of anonymity because he was not authorized to discuss internal deliberations.
“He has the trust and confidence of any number of people within the Justice Department and within the law enforcement community, but also the White House,” Mr. Leo said of Mr. Whitaker.
Mr. Whitaker’s potential ascendance came into play late on Friday, hours after a New York Times article revealed that Mr. Rosenstein had discussed secretly taping his conversations with the president and talked about using the 25th Amendment to remove him from office.
While Mr. Rosenstein disputed the report, people close to the president said that Mr. Rosenstein privately told White House officials that the account possibly hurt him. Facing the prospect of being called to testify about the matters on Capitol Hill, he told White House aides that he would be willing to resign.
Mr. Sessions discussed the possibility of changes with associates on Sunday, according to a person who spoke to him. And Mr. Whitaker told people he was expecting to take over as the acting deputy attorney general because White House advisers had told him it would happen, according to the people briefed on the discussions.
Mr. Trump has privately told aides that he believes that Mr. Rosenstein disparaged him. But in a news conference on Wednesday after attending the United Nations General Assembly, Mr. Trump said he might delay a planned meeting with Mr. Rosenstein set for Thursday. He added that his preference was to leave Mr. Rosenstein to “finish” the job overseeing the special counsel investigation.
But if he were to choose Mr. Whitaker as a replacement over Mr. Rosenstein’s own deputy, Ed O’Callaghan, who would typically be next in line to be acting deputy attorney general, such a move would prove how much Mr. Trump has come to trust Mr. Whitaker.
As the acting deputy attorney general, Mr. Whitaker would oversee the nation’s federal prosecutors, including the investigations of Mr. Trump’s former personal lawyer, Michael D. Cohen, the Trump Organization and the business run by the father of Mr. Kushner.
The Russia investigation would be overseen by the solicitor general, Noel J. Francisco. But Mr. Whitaker could have visibility into the special counsel’s work. Officials in the deputy attorney general’s office have met regularly with Mr. Mueller’s team.