SEVERAL NEWS outlets, including The Post, reported Wednesday that Deputy Attorney General Rod J. Rosenstein intends to resign once a new attorney general is confirmed to lead the Justice Department. This means that yet another competent, public-spirited federal official is exiting, leaving an uncertain future for a powerful government department that President Trump neither understands nor respects.

Mr. Rosenstein deserves the public’s thanks for his torturous past two years at Justice. Though his tenure started dubiously, with Mr. Rosenstein playing a role in Mr. Trump’s termination of James B. Comey as FBI director, steadiness has defined his time as the nation’s No. 2 law enforcement officer. He rightly appointed a special counsel to investigate weighty questions about Russia’s interference in the 2016 presidential election. He chose consummate professional Robert S. Mueller III to serve in that role. As the president escalated his attacks on Mr. Rosenstein, Mr. Mueller and others in the Justice Department, the deputy attorney general took the heat and continued working.

Mr. Rosenstein also deserves thanks for delaying his departure until the Senate confirms a new attorney general. It would have been beyond alarming if he had left with Matthew G. Whitaker, the unqualified radical Mr. Trump chose to serve as acting attorney general, still at the top of the Justice Department.

We hope Mr. Rosenstein’s decision to resign is a sign of confidence in attorney general nominee William P. Barr. Once Mr. Rosenstein is out, Mr. Barr, if confirmed, will be the Mueller probe’s overseer. He will preside over other politically sensitive investigations, such as the inquiry into the misdeeds of former Trump fixer Michael Cohen. And he will have to manage his relationship with a president with a history of applying inappropriate pressure on law enforcement.

The Senate next week will begin considering Mr. Barr. Mr. Rosenstein’s intentions make it all the more crucial that senators thoroughly vet the would-be attorney general. “He has a high opinion of Mr. Mueller,” Sen. Lindsey O. Graham (R-S.C.), the incoming Judiciary Committee chairman, said after meeting with Mr. Barr on Wednesday. “He has no reason for Mr. Mueller to stop doing his job and is committed to letting Mr. Mueller finish his work.”

In next week’s hearings, senators must press Mr. Barr for details on what the president has asked of him, how he would respond if the president told him to kill an investigation or prosecute a political opponent, whether he would release the Mueller report once it is completed, and whether he would commit to following the advice of ethics counsel if he were suspected of having a conflict of interest. Senators should also probe Mr. Barr’s views on when the president can be guilty of obstruction of justice, an issue on which his recent writings suggest he is deferential to the Oval Office.

To make clear to Mr. Barr and Mr. Trump what they expect, senators should finally pass a bill protecting the special counsel’s investigation from unwarranted political interference. Though many observers speculate that the probe is wrapping up, there is no sure indication that is true, and the inquiry must proceed for as much time as Mr. Mueller needs.

Mr. Rosenstein has protected the Justice Department’s integrity at a crucial time. The next generation of leaders must do the same.

Read more: