WASHINGTON — Four prosecutors abruptly withdrew on Tuesday from the case of President Trump’s longtime friend Roger J. Stone Jr. after senior Justice Department officials intervened to recommend a more lenient sentence for crimes he committed in a bid to protect the president.

In an extraordinary decision overruling career lawyers, the Justice Department recommended an unspecified term of incarceration for Mr. Stone instead of the prosecutors’ request of a punishment of seven to nine years. The move coincided with Mr. Trump’s declaration on Twitter early Tuesday that the government was treating Mr. Stone too harshly.

The development immediately prompted questions about whether the Justice Department was bending to White House pressure. The gulf between the prosecutors and their Justice Department superiors burst into public view the week before Mr. Stone was to be sentenced for trying to sabotage a congressional investigation that had posed a threat to the president.

[What we know about the four prosecutors who quit the Roger Stone case.]

The prosecutors — one of whom resigned from the department — were said to be furious over the reversal of their sentencing request, filed in federal court late Monday. The Stone case was one of the most high-profile criminal prosecutions arising from the nearly two-year investigation of Russian interference in the 2016 election by the special counsel, Robert S. Mueller III.