Updated Nov. 7, 2018: President Trump forced out Attorney General Jeff Sessions on Wednesday and announced Matthew Whitaker, Mr. Sessions’s chief of staff, will take over as acting attorney general. Read the latest, here.

WASHINGTON — 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.