President Donald Trump on Friday ignored his attorney general's public request to stop tweeting about the Justice Department, saying he had the legal right to ask the agency to intervene in a criminal case but so far has “chosen not to.”

Trump's Friday morning tweet came just hours after Attorney General William Barr said in a striking interview with ABC News that the president's tweets were making it “impossible for me to do my job," especially following the department's bungled handling of the sentencing recommendation for Trump ally and confidant Roger Stone.

Trump, in his tweet, left open the possibility that he would ask Barr for something in a criminal matter in the future.

Barr has already appointed a U.S. attorney who is conducting a criminal investigation into the origins of the FBI's probe of the 2016 election that morphed into special counsel Robert Mueller's investigation of possible Trump-Russia cooperation.

The Justice Department is also reviewing the handling of the federal investigation into Trump's former National Security Adviser Michael Flynn, a person familiar with the matter told The Associated Press on Friday. Flynn has pleaded guilty to lying to the FBI during its probe of ties between the Trump campaign and Russia. The U.S. attorney in St. Louis, Jeff Jensen, is working with Brandon Van Grack, a member of Mueller’s team, to review the Flynn case, a Justice Department official said.

As president, Trump technically has the right to compel the Justice Department to investigate as an executive branch agency. But historically, when it comes to decisions on criminal investigations and prosecutions, Justice has functioned as an independent agency, unmoved and unbound by political sway. And that reputation is important to Barr, as he made clear in the interview.

“I’m happy to say that, in fact, the president has never asked me to do anything in a criminal case,” Barr told ABC. “However, to have public statements and tweets made about the department, about our people ... about cases pending in the department, and about judges before whom we have cases, make it impossible for me to do my job and to assure the courts and the prosecutors in the department that we’re doing our work with integrity.”

The attorney general had repeatedly shared the same sentiment in private conversations in recent weeks, telling Trump he was frustrated with the president's public comments and tweets about Justice Department cases, a person familiar with the matter told the AP. The person was granted anonymity to discuss the private conversations.

Barr was directly asked in the TV interview whether he believed Trump had the authority to direct him to open an investigation.

“Terrorism or fraud by a bank or something like that where he’s concerned about something, he can certainly say I think someone should look into that. That’s perfectly appropriate," Barr said. ”If he were to say, you know, go investigate somebody because — and you sense it’s because they’re a political opponent, then an attorney general shouldn’t carry that out, wouldn’t carry that out."

Trump has publicly and privately raged about payback in the form of investigations against his perceived enemies, including former FBI Director James Comey and former FBI Director Andrew McCabe — who prosecutors said Friday they would not charge with lying about leaking — and he's also pressed for investigations into political rival Joe Biden and his son Hunter, especially following Trump's impeachment acquittal over a phone call where he asked Ukraine's leaders to investigate the Bidens.

Trump has tweeted scores of times that Comey should be charged with crimes. He was particularly incensed that no charges were filed over the former FBI director’s handling of memos about his interactions with Trump, according to a White House official and Republican close to the White House not authorized to speak publicly about private discussions.

The president angrily denounced the decision not to charge Comey to aides and berated Barr over it, according to the officials. Aides expected the decision not to charge McCabe could produce a similar angry reaction.

Trump has also repeatedly complained about FBI Director Christopher Wray in recent months, saying that Wray has not done enough to rid the bureau of people who are disloyal to him.

An administration official acknowledged there has been some tension between Trump and Barr in recent weeks, but Trump still has confidence in Barr and believes he is a far better attorney general than Jeff Sessions, who drew Trump’s ire after removing himself from the Russia investigation because of his previous work with the Trump campaign.

The official, who spoke on condition of anonymity in order to discuss internal deliberations and private conversations, said Trump also knows it would be risky to remove Barr ahead of the 2020 election and that it is highly unlikely he could find a suitable replacement before then.

Officials in the attorney general's office gave the White House a readout of the interview after it was taped but before it aired on ABC's website. After the interview Thursday evening, the White House offered a tempered response that Trump “wasn’t bothered by the comments at all.”

But the president on Friday quoted one of Barr's comments in the interview: “The president has never asked me to do anything in a criminal case.” A.G. Barr — and then Trump added in his tweet — “This doesn’t mean that I do not have, as President, the legal right to do so, I do, but I have so far chosen not to!”

Earlier this week, the Justice Department overruled its own prosecutors — who had recommended in a court filing that Trump’s longtime ally and confidant Roger Stone be sentenced to 7 to 9 years in prison — and took the extraordinary step of lowering the amount of prison time it would seek. The department didn't offer an amended number. The entire trial team of prosecutors quit the case after the amended filing, and one quit the DOJ altogether.

Barr faced intense criticism over the decision because it came just hours after Trump tweeted his displeasure about the recommendation.

Stone was convicted in November of tampering with a witness and obstructing the House investigation into whether the Trump campaign coordinated with Russia to tip the 2016 election. He’s scheduled to be sentenced by a federal judge next week.

It was highly unusual for a member of the Cabinet to publicly criticize the president — especially a Trump loyalist who shares the president's views on expansive executive powers. Barr's Thursday's comment served as a defense of his own integrity — an effort to salvage his reputation and that of the Department of Justice by publicly rebuking the president he's close to.

Yet Barr stopped short of alleging wrongdoing by anyone.

House Democrats frustrated over the Senate’s acquittal of Trump want answers from Barr about what they see as his efforts to politicize federal law enforcement. House Judiciary Committee Chairman Jerrold Nadler said this week that Barr will testify before the panel March 31 and that lawmakers will ask him about his involvement in the Stone case.

The Justice Department insisted the decision to undo the sentencing recommendation was made Monday night — before Trump blasted the recommendation on Twitter as “very horrible and unfair”— and prosecutors had not spoken to the White House about it.

Barr joined a roster of high-level aides who have publicly criticized Trump, though the rest left their jobs first. Former National Security Adviser John Bolton is to publish a book next month detailing his time in the White House including criticism of Trump actions such as his decision to withhold military assistance while seeking a political favor from Ukraine. And former Chief of Staff John Kelly, who has largely kept a low profile since leaving the White House, has grown more open about his unflattering assessments of the president.