The Department of Justice has told lawyers for former FBI Deputy Director Andrew McCabe that he will not face criminal charges for allegedly lying to investigators about a leak to the media, the ex-official's attorneys said Friday.

The decision was released on the same day it was revealed that a federal judge had expressed concerns months ago that McCabe's case was looking like a "banana republic" prosecution.

"We write to inform you that, after careful consideration, the government has decided not to pursue criminal charges against your client,” J.P. Cooney of the U.S. Attorney’s Office in Washington, D.C., told McCabe’s attorneys in a letter Friday. “Based on the totality of the circumstances and all of the information known to the government at this time, we consider the matter closed.”

McCabe's lawyers Michael R. Bromwich and David Schertler responded in a statement, saying, "At long last, justice has been done in this matter."

President Donald Trump had publicly urged that action be taken against McCabe, the former deputy FBI director who briefly became acting head of the agency after Trump fired James Comey in 2017.

"He LIED! LIED! LIED!" Trump wrote in one 2018 tweet about McCabe after the Justice Department's inspector general found McCabe "lacked candor" when being interviewed about whether he was a source for two news articles pertaining to the FBI in 2016.

The Justice Department's announcement came one day after Attorney General William Barr pushed back against criticism he's using the department to do Trump's bidding, and said Trump's tweeting about his agency's work was undercutting his authority.

"Public statements and tweets made about the department, about people in the department, our men and women here, 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 department that we're doing our work with integrity," Barr, who was sworn in a year ago Friday, told ABC News.

McCabe told CNN on Friday that "the timing is curious" but he was relieved that the Justice Department "did the right thing today."

"To have this horrific black cloud that's been hanging over me and my family for almost the last two years, to have that finally lifted is just unbelievable," he said. "It's a relief that I'm not sure I can really explain to you adequately. It's just a very emotional moment for my whole family."

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

McCabe has denied intentionally misleading investigators. He told CNN that he has maintained from the day the inspector general's report came out that if investigators "followed the law and they followed the facts, that I would have nothing to worry about. But as the president's interest in pursuing his perceived political enemies continued over the last two years, we were getting more and more concerned about where this would end up."

Those worries had increased in recent days, he told the network.

"I've been greatly concerned by what I've seen take place in the White House and in the Department of Justice, quite frankly, in the last week," McCabe said. "And certainly the president's kind of revenge tirade following his acquittal in the impeachment proceeding has only kind of amplified my concerns about what would happen in my own case."

The Justice Department's decision came the same day it was required by a judge to make details about the McCabe investigation public in a case stemming from a Freedom of Information Act lawsuit brought by Citizens for Responsibility and Ethics in Washington.

The court transcripts, released after the Justice Department's letter to McCabe's lawyers, show prosecutors struggling with how to proceed in his case, and the judge in the matter expressing concerns about political pressure.

In one of the newly released transcripts, from a hearing in July, Cooney, who heads the Washington U.S. Attorney's Office fraud unit, told the judge they expected to make a decision on whether to charge McCabe within 60 days.

When they returned to court in early September, Cooney told Judge Reggie Walton, a George W. Bush appointee, that no decision had been made, but they expected to have one within days.

At the next hearing, on Sept. 30, Cooney said "That prediction was obviously incorrect."

The judge asked why it was taking so long.

"I don't know why it's so difficult for a decision to be made," Walton said. "Either you have a case or you don't."

Cooney told the judge "this is an exceedingly difficult matter and situation" and that he needed another three months.

"I don't get it," the judge said, telling Cooney he needed to make a decision in the CREW lawsuit and that "it seems to me from the standpoint of Mr. McCabe, he has a right to have the government make a decision and not hold his life in limbo pending a decision as to what's going to happen."

'It's a banana republic'

Walton added, "I understand there are political implications and other implications involved in reference to whether you go forward. And I fully appreciate the complexity of the assessment, especially — unfortunately, to be candid — in light of the way by the White House, which I don't think top executive officers should be doing. Because it does, I think, really complicate your ability to get a fair adjudication from the government's prospective.

"Because 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. "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 undue inappropriate pressure being brought to bear."

"It's very disturbing that we're in the mess that we're in in that regard," Walton added later. "Because I think having been a part of the prosecution for a long time and respecting the role that prosecutors play in the system. I just think the integrity of the process is being unduly undermined by inappropriate comments and actions on the part of people at the top of our government. I think it's very unfortunate. And I think as a government and as a society, we're going to pay a price at some point for this."

Trump has sounded off repeatedly about McCabe in interviews and on Twitter over the past three years, including calling him "a poor man's J. Edgar Hoover." Among Trump's problems with the Justice Department veteran is that McCabe ordered obstruction of justice and counterintelligence investigations into the president after he fired Comey, who was investigating the Trump campaign's ties to Russia.

Then-Attorney General Jeff Sessions fired McCabe in March of 2018, two days before he was set to retire and become eligible for full pension benefits.

McCabe filed suit against the Justice Department in August, saying he was fired as a result of “Trump’s unconstitutional plan and scheme to discredit and remove DOJ and FBI employees who were deemed to be his partisan opponents because they were not politically loyal to him.”