A federal judge compared White House involvement in an investigation of former FBI Deputy Director Andrew McCabe to a “banana republic,” and accused people “at the top” of undermining the “integrity” of the judicial process, new documents revealed Friday.

The Justice Department announced Friday that it wasn’t pursuing any criminal charges against McCabe — a frequent target of Trump’s — for allegedly misleading investigators about a leak to the media concerning an FBI probe into the Clinton Foundation.

Walton, who was appointed to the bench by President George W. Bush and serves in the District of Columbia, chided DOJ prosecutors in September for repeated delays in deciding whether to bring charges against McCabe and keeping him under a cloud of suspicion, which he suspected served White House interests.

“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,” he said, according to a transcript of a discussion when prosecutors requested yet another delay.

“I don’t think people like the fact that you got somebody at the top basically trying to dictate whether somebody should be prosecuted. 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 ... influencing the ultimate decision,” Walton said. “I think there are a lot of people on the outside who perceive that there is undue, inappropriate pressure being brought to bear.”

The judge called it “disturbing,” adding that 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.” He warned that “as a government and as a society we’re going to pay a price at some point for this.”

Walton also said that McCabe had 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.”

I don’t think people like the fact that you got somebody at the top basically trying to dictate whether somebody should be prosecuted. U.S. District Judge Reggie Walton

McCabe took over as acting FBI director after Trump fired the agency’s former director, James Comey, in May 2017. At the time, the FBI was investigating the Trump campaign’s ties to Russia. After Comey’s firing, Robert Mueller was named as a special prosecutor to conduct the probe.

McCabe quickly became a target of attacks by Trump, as well Fox News commentators who parrot the White House talking points. He was fired from his post in early 2018 by then-attorney general Jeff Sessions, just hours before the 21-year FBI veteran was set to retire and become eligible for a full pension.

McCabe subsequently sued the DOJ, arguing that 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.”

McCabe’s attorney was informed in a Friday letter of the DOJ’s decision that criminal charges would not be filed.

Trump was reportedly furious when he found out charges were not going to filed.

McCabe called the decision a tremendous “relief” in an interview on CNN, but slammed the DOJ for taking two years to reach an “obvious conclusion.” (See the video above.)

He also said that the timing of the decision — “coming on the tails of all the controversy over the Roger Stone sentencing — is curious,” indicating that the announcement may have been intended to calm the controversy over Barr’s recent interference in other cases.

The Justice Department on Tuesday overturned a sentencing recommendation of seven to nine years for Stone, Trump’s long-time pal and one-time adviser who has been convicted of seven felonies, a day after the president complained about the proposed penalty. Barr has since also ordered a review of the case against Trump’s former national security adviser Michael Flynn, who initially pleaded guilty to lying to investigators about his communication with then-Russian Ambassador Sergey Kislyak before Trump was sworn into office. Flynn withdrew his guilty plea last month.