Updated at 2:25 p.m.

Former FBI leader Andrew McCabe will not face charges in an investigation centered on whether he lied to investigators about a media leak, the U.S. Justice Department said Friday, lifting months of uncertainty over whether the regular target of President Donald Trump's ire would face a criminal prosecution.

In a letter to McCabe's defense lawyers, a top prosecutor in the U.S. attorney's office in Washington said the Justice Department had decided after "careful consideration" to not bring charges. The letter was signed by J.P. Cooney, chief of the fraud and public corruption section at the U.S. Attorney's Office, and by Molly Gaston, a career prosecutor in the section.

"Based on the totality of the circumstances and all of the information known to the government at this time, we consider the matter closed," Cooney and Gaston wrote.

The letter came just days after Justice Department leaders intervened in the case of Roger Stone, overruling career prosecutors in Washington who had recommended the longtime Trump confidant receive a prison term of between seven and nine years.

The move drew broad criticism from observers who said Main Justice had interfered with the decisions of career prosecutors. Three career prosecutors withdrew from the Stone case, and a fourth resigned from his post altogether. An advocate for career government lawyers has defended the integrity of the original four Stone prosecutors, saying they had done nothing improper in recommending a prison term within the guideline range.

The Justice Department on Tuesday suggested a more lenient sentence after an early morning tweet in which Trump criticized the initial recommendation as overly harsh, inviting speculation of presidential interference in Stone's case and perhaps others being handled by the U.S. attorney's office in Washington. Stone is set to appear Feb. 20 before U.S. District Judge Amy Berman Jackson of the District of Columbia.

A Justice Department spokesperson, Kerri Kupec, has denied that department leaders communicated with Trump or anyone else in the White House about Stone's case. The DOJ has said the decision to amend the sentencing recommendation was made Monday night, before Trump unleashed a Twitter tirade against the proposed prison term.

As McCabe faced the possibility of criminal charges, a federal judge in Washington pressured the Justice Department to provide more clarity about the status of the investigation.

U.S. District Judge Reggie Walton of the District of Columbia criticized the Justice Department for leaving McCabe in "limbo," saying it was "unconscionable" to have the threat criminal prosecution hanging over someone for so long in what he saw as a straightforward case. His remarks came in a case involving a request from the watchdog group Citizens for Responsibility and Ethics in Washington for Justice Department records about McCabe's firing.

Newly released court transcripts, posted on Friday, further revealed Walton's frustration with the pace of the McCabe investigation, the secrecy surrounding it and the apparent pressure Trump was putting on the Justice Department to bring charges.

Cooney had told Walton in early September that the McCabe matter would be resolved soon, but later that month returned to tell the court that his prediction did not pan out. Part of that hearing still remains sealed. Cooney asked for three more months to apprise the court. Walton gave the government six weeks.

"The public is listening to what's going on, and I don't think people like the fact that you got somebody at the top basically trying to dictate whether somebody should be prosecuted," Walton said, according to the newly unsealed transcript. "I just think it's a banana republic when we go down that road and we have those type of statements being made that are conceivably even if not influencing the ultimate decision, I think there are a lot of people on the outside who perceive that there is undo inappropriate pressure being brought to bear."

Walton, a former Justice Department lawyer, recounted that he'd never had to endure circumstances where there was "either perceived or actual pressure on the office as to whether you prosecute somebody for a criminal offense."

Cooney responded: "No, I completely understand. And I want to assure the Court that I and others involved in this take our representation of the United States and the Department of Justice very seriously."

Michael Bromwich. Michael Bromwich. October 18, 2018. (Photo: Diego M. Radzinschi/ALM)

McCabe's defense lawyers, Michael Bromwich at Steptoe & Johnson and David Schertler of Washington's Schertler and Onorato, said in a statement:

"We learned this morning through a phone call from the D.C. U.S. Attorney's Office that was followed by a letter that the Justice Department's criminal investigation of Andrew McCabe has been closed. This means that no charges will be brought against him based on the facts underlying the Office of the Inspector General's April 2018 report. At long last, justice has been done in this matter. We said at the outset of the criminal investigation, almost two years ago, that if the facts and the law determined the result, no charges would be brought. We are pleased that Andrew McCabe and his family can go on with their lives without this cloud hanging over them."

McCabe, who was fired just days before he was set to retire with full benefits, is challenging his termination in federal court in Washington. He is represented in that case from lawyers at Arnold & Porter Kaye Scholer.

Read the letter from prosecutors below: