Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The former U.S. attorney whose office oversaw the Roger Stone prosecution resigned from the Trump administration Wednesday, two days after President Donald Trump abruptly withdrew her nomination for a top job at the Treasury Department.

Jessie Liu had headed the U.S. attorney's office in Washington, D.C., which oversaw several cases that originated with former special counsel Robert Mueller's investigation into Russian meddling in the 2016 election, including prosecutions of longtime Trump associate Stone and former national security adviser Michael Flynn.

Liu was moved from the U.S. attorney's office after Trump nominated her to serve as the Treasury Department's undersecretary for terrorism and financial crimes, a top position overseeing economic sanctions.

A source told NBC News earlier this week that after Liu was nominated, she told the lawyers in her office that she would stay put until she was confirmed. However, Attorney General William Barr asked her to leave around Feb. 1 to ensure continuity in the office, and she agreed.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

On the day Liu left, the Justice Department submitted a softer sentencing recommendation for Flynn, who had pleaded guilty to lying to the FBI. The new filing said prosecutors believed probation would be an appropriate sentence for Flynn. They had previously asked that he spend up to six months behind bars.

A similar scenario played out in a more spectacular way in Stone's this case week. After prosecutors on the case recommended a 7 to 9 year sentence for Stone on Monday, the U.S. attorney's office abruptly changed course the next day, saying that amount of time would be "excessive" and that Stone should get a lesser sentence.

Stone's entire prosecution team resigned from the case in protest.

The 180-degree turn came after Trump had tweeted overnight that the proposed sentence was "disgraceful!"

"This is a horrible and very unfair situation," the president wrote in a followup post on Twitter. "The real crimes were on the other side, as nothing happens to them. Cannot allow this miscarriage of justice!"

Top Justice Department spokesperson Kerri Kupec told NBC News that the decision to reverse course on the sentencing recommendation was made before Trump's tweet at almost 2 a.m.

Liu was not involved in the sentencing debacle, but the president apparently hasn't been happy with how her office handled the case initially, telling reporters in the Oval Office on Tuesday that "I thought the whole prosecution was ridiculous."

Liu's office also handled the criminal investigation into former acting FBI Director Andrew McCabe, who was accused by the Justice Department's inspector general of lying to investigators. McCabe has not been charged, despite calls by Trump for him to go to prison.

Senate Minority Leader Chuck Schumer, D-N.Y., has called for the Justice Department's inspector general to investigate what pressure Trump and Barr might have exerted behind the scenes. He said the rule of law "is just being totally perverted to Donald Trump's own personal desires and needs and it's a disgrace."