The Justice Department is dropping the criminal case against President Donald Trump’s first national security adviser, Michael Flynn, whose lies about his contacts with Russia prompted Trump to fire him three years ago and special counsel Robert Mueller to flip him to cooperate in the Russia investigation. The request to drop the case, filed with a federal judge in DC District Court on Thursday, is a sudden end to a protracted legal battle that’s lately been fertile ground for Trump to attack the early Russia investigation and former FBI leadership he dislikes. It’s also a broadside against the Mueller investigation and the FBI, especially officials who served during the Obama administration, whom Trump has now deemed his foes. Both sought to investigate Trump campaign advisers’ ties with Russia and the 2016 election and found many interactions between campaign affiliates and Russians, including Flynn’s contacts. For more than two years, the Justice Department had defended its prosecution of Flynn in court — until Thursday. The department did not brief the White House on its decision to seek to drop the Flynn case, Justice Department spokeswoman Kerri Kupec said. In its latest court filing, the Justice Department laid out the reversal in a 20-page narrative, pointing to newly disclosed and declassified records about what happened with Flynn. The prosecutor on Thursday wrote that the investigation in 2017 into Flynn and his phone calls with the then-Russian Ambassador Sergey Kislyak during the Trump transition should not have happened – feeding into the President and his supporters’ claims that all of the events that stemmed from Flynn’s interview in the West Wing were illegitimate. The filing drew swift criticism from former top FBI officials who had worked on the case and supported the investigation into Flynn. The court must still formally approve the request. Flynn twice, before two separate judges, admitted to lying to the FBI about his interactions with Kislyak during the Trump presidential transition. But last year, he fired his original defense team that cut his deal with Mueller and waged a campaign to try to get a judge to reverse his guilty plea. Flynn faced potential jail time. In its filing, the Justice Department condemned the FBI’s work when it interviewed Flynn in the West Wing in the first weeks of the Trump presidency. The FBI’s Flynn investigation was already going to be closed, they wrote, when the FBI learned of Flynn’s calls with Kislyak before deciding it wanted to interview him. In December 2016, Flynn asked Kislyak not to retaliate against the Obama administration’s sanctions and to oppose the Obama administration in an upcoming United Nations vote on Israel. Though the FBI pressed forward, the Justice Department was unlikely to prosecute Flynn for negotiating with Russia before Trump took office, the filing on Thursday said, citing interviews with the then-acting attorney general and others about decision-making in the Flynn case. The FBI approached Flynn in the White House in late January 2017, and in the interview, he denied asking Russia for certain actions. Flynn’s legal team and Trump last week had seized on the disclosure of a hand-written note from a top FBI official outlining how agents may either refer Flynn for prosecution of illegally negotiating with a foreign government or “get him to lie” or “get him fired.” That note, and whether Flynn’s lies in the interview were notable enough to bring a case, also factored into the department’s dismissal request on Thursday. The Justice Department called the FBI’s counterintelligence investigation into Flynn for his contacts with Russia “a no longer justifiably predicated investigation,” according to the Thursday filing. “After a considered review of all the facts and circumstances of this case, including newly discovered and disclosed information appended to the defendant’s supplemental pleadings, the Government has concluded that the interview of Mr. Flynn was untethered to, and unjustified by, the FBI’s counterintelligence investigation into Mr. Flynn – a no longer justifiably predicated investigation that the FBI had, in the Bureau’s own words, prepared to close because it had yielded an ‘absence of any derogatory information,’” DC US Attorney Timothy Shea wrote in the filing. Shea, a political appointee, alone signed the court document – an unusual move. The Flynn filing was not signed by any career prosecutors at the Justice Department. That’s a departure from how lower-level prosecutors typically handle all court filings, even in high-profile cases including Flynn’s, while the political appointees they work for act as figureheads. Just before the filing, a former Mueller team prosecutor who was still on the case, withdrew. Another career prosecutor in DC who has handled the Flynn case didn’t sign the document either. The Justice Department also said it can’t prove beyond a reasonable doubt that Flynn lied, nor that his lies were substantial. “The Government is not persuaded that the January 24, 2017 interview was conducted with a legitimate investigative basis and therefore does not believe Mr. Flynn’s statements were material even if untrue. Moreover, we (do) not believe that the Government can prove either the relevant false statements or their materiality beyond a reasonable doubt,” the filing states. On April 30, Trump suggested that Flynn would be exonerated and referred to the FBI agents as “dirty, filthy cops.” “It looks like to me that Michael Flynn would be exonerated based on everything that I see,” Trump said. “I’m not the judge, but I have a different type of power.” On Thursday, Trump said Flynn is “innocent.” “I’m very happy for General Flynn, he was a great warrior, and he still is a great warrior. Now in my book is an even greater warrior,” Trump said. Attorney General William Barr said the Justice Department had a “duty” to move to dismiss the charges against Flynn, denying in an interview with CBS News Thursday evening that he was doing the President’s bidding with the remarkable reversal and asserting that he was “doing the law’s bidding.” Barr echoed the legal reasoning to drop the case that was laid out in the filing, saying that “a crime cannot be established here.” The FBI “did not have a basis for a counterintelligence investigation against Flynn at that stage,” Barr said, adding that “people sometimes plead to things that turn out not to be crimes.” Criticism of Justice Department Former FBI officials, including the agent who interviewed Flynn, condemned the Justice Department’s move on Thursday as politically motivated and contrary to the facts of the situation with Flynn. RELATED: Justice Department provides Flynn’s attorneys with documents from Barr’s re-examination Former FBI Director James Comey, whom Trump had pressured in early 2017 to drop the Flynn investigation, tweeted: “The DOJ has lost its way.” Former FBI Deputy Director Andrew McCabe defended the early Russia investigation. In a statement provided by his legal team, McCabe recounted why the FBI investigated Flynn in early 2017. Flynn had “high level interactions” with Russian officials and the FBI had “incontrovertible evidence” that Flynn tried to influence those officials, McCabe wrote. “The FBI was obligated to interview him to better understand why he was talking to Russian officials. During the interview, he lied about the substance of his conversations with those officials,” McCabe said. “His lies added to our concerns about his relationship with the Russian government. Later, under oath in Federal Court, he twice admitted to lying to the FBI.” McCabe also took a shot at the Justice Department’s new argument that the FBI should not have interviewed Flynn, saying it “ignores the considerable national security risk his contacts raised.” “Moreover, the Department’s position contradicts the findings by both the Special Counsel and the Office of the Inspector General,” McCabe added. And the defense attorney for former agent Peter Strzok, who left the Russia investigation amid a text message scandal in which he criticized Trump, said in a statement, “This is a sad day for the rule of law in America. … Today’s action by the Department of Justice provides yet more evidence of President Trump’s determination to politicize the Department, and Attorney General Barr’s determination to assist the President in doing so.” Mueller, now a partner at a private law firm, did not respond to a request for comment. The Justice Department’s Inspector General’s office, which previously looked into the FBI’s dealings with Flynn, didn’t immediately provide a comment. Prosecutor quits Jeff Jensen, the US attorney in St. Louis that Barr named earlier this year to review the handling of the Flynn case, said in a statement provided by the Justice Department that he recommended that the case be dismissed. “Through the course of my review of General Flynn’s case, I concluded the proper and just course was to dismiss the case. I briefed Attorney General Barr on my findings, advised him on these conclusions, and he agreed,” Jensen said. Minutes before the announcement, Brandon Van Grack, the lead Mueller prosecutor who cut the deal with Flynn, withdrew from the case. Van Grack gave no detail on the reason for his exit, writing only to the court to “please notice the withdrawal.” Van Grack remains in his job in the Justice Department’s national security division, according to the Justice Department, though his sudden exit from the case on Thursday had echoes of how his colleagues quit the Roger Stone criminal prosecution after Barr intervened to soften their recommendation of a prison sentence. This story has been updated with additional developments.