US Attorney General William Barr has said that President Donald Trump "undercuts" him by tweeting, making it "impossible for me to do my job".
His criticism of Mr Trump comes amid intense scrutiny of the Justice Department over the handling of a case involving Roger Stone – a convicted former advisor to the president.
The attorney general had been accused of bowing to presidential pressure.
Mr Barr's comments are a rare sign of annoyance with Mr Trump.
"I think it's time to stop the tweeting about Department of Justice criminal cases," Mr Barr told ABC News.
"I cannot do my job here at the department with a constant background commentary that undercuts me," he added.
Senate Majority Leader Mitch McConnell said that the president should listen to Mr Barr's advice.
"If the attorney general says it's getting in the way of doing his job, the president should listen to the attorney general," the Republican senator told Fox News.
- Prosecutors quit Trump ally case over sentence dispute
- Roger Stone: Trump ally and Russia probe defendant
There was widespread anger this week when the Justice Department said it planned to reduce the length of the prison sentence it would seek for Stone, a long-time friend of the president.
Stone was convicted in November of obstructing an investigation by the House Intelligence Committee into Russian interference in the 2016 election.
Federal prosecutors had initially recommended that Stone should face seven to nine years in jail for trying to thwart the investigation.
The president swiftly voiced his opposition, tweeting: "This is a horrible and very unfair situation."
The Justice Department then overruled the recommendation by its own prosecution team, prompting questions over whether Mr Barr had intervened on behalf of Mr Trump's ally. The four prosecutors then quit.
President Trump praised Mr Barr for "taking charge" of the case.
Congratulations to Attorney General Bill Barr for taking charge of a case that was totally out of control and perhaps should not have even been brought. Evidence now clearly shows that the Mueller Scam was improperly brought & tainted. Even Bob Mueller lied to Congress!
— Donald J. Trump (@realDonaldTrump) February 12, 2020