Deputy Attorney General Rod J. Rosenstein at the Justice Department in July. (Win McNamee/Getty Images North America)

FOR A nerve-wracking hour or so Monday morning, reports circulated that Deputy Attorney General Rod J. Rosenstein had resigned in anticipation that President Trump would fire him. It turned out that Mr. Rosenstein had neither resigned nor been fired, though he has a meeting scheduled for Thursday with Mr. Trump. Mr. Rosenstein, a rare voice of reason within this administration, might still be facing termination.

Such a move would pose a potential threat to the investigation by special counsel Robert S. Mueller III, to the independence of the Justice Department and, more broadly, to the rule of law.

Speculation about Mr. Rosenstein’s future was stoked by a New York Times report citing sources who said the deputy attorney general last year discussed secretly taping the president and the possibility of the 25th Amendment being invoked. That amendment envisions the Cabinet removing from office a president who is incapacitated. Mr. Rosenstein reportedly did this shortly after he took his place in the Justice Department and just after Mr. Trump fired then-FBI Director James B. Comey, launching the administration into a self-provoked tailspin.

Mr. Rosenstein responded that he sees no reason for removing Mr. Trump. The Justice Department said his talk of recording the president was sarcastic. More to the point, there is no evidence Mr. Rosenstein in the intervening year tried to record the president or remove him from office.

Instead, he has run the Justice Department with integrity, which has not always pleased Mr. Trump but has been crucial for the country. Mr. Rosenstein was responsible for hiring Mr. Mueller and overseeing his Russia probe, after Attorney General Jeff Sessions properly recused himself from the matter. Mr. Rosenstein was right to name a special counsel, to build an extra layer of independence between Trump appointees such as himself and an investigation that could implicate the president and members of his circle. He made a superior choice in Mr. Mueller, a no-nonsense lifetime civil servant who has run a tight, professional operation.

Mr. Trump has never forgiven Mr. Sessions for recusing himself and has routinely attacked him and Mr. Rosenstein for the Mueller “witch hunt.” Never mind that the probe has already resulted in guilty pleas from five former Trump associates.

Mr. Rosenstein also surely did not endear himself to the president as he resisted the disclosure of sensitive Justice Department documents to pro-Trump provocateurs in the House of Representatives, whose goal is to discredit federal law enforcement and its investigation of Russia’s influence campaign during the 2016 presidential election. Some House Republicans even moved to impeach Mr. Rosenstein in the dispute over the documents. “The Department of Justice is not going to be extorted,” Mr. Rosenstein declared in May.

Between now and Thursday, lawmakers should insist that Mr. Trump leave Mr. Rosenstein alone, making clear that a move against the deputy attorney general would provoke a backlash at least as damaging as Mr. Trump’s 2017 firing of Mr. Comey. Republicans in Congress previously refused to pass legislation insulating the Mueller probe from Mr. Trump’s wrath, arguing that it was not necessary. That argument was never plausible, and lawmakers may be nearly out of time.