FBI analysts involved in the investigation into former national security adviser Michael Flynn expressed serious concerns about the agency’s conduct on the case, with one employee describing the case as a “nightmare,” according to federal court filings released by Flynn’s legal team Wednesday.

The documents detailed conversations between FBI employees in the early days of its probe into improper dealings between Flynn and Russia. In an Aug. 2016 exchange obtained by the Justice Department, an FBI analyst said that some agents “want a Clinton presidency” rather than a “wild card like Trump.”

READ: MICHAEL FLYNN COURT DOCUMENTS SHOW FBI MESSAGES

As the investigation progressed, some FBI analysts questioned the agency’s use of national security letters (NSL)– a type of subpoena that doesn’t require a judge’s approval – to investigate Flynn’s finances. On Dec. 5, 2016, analysts noted the use of an NSL was not a “logical investigative step,” with one analyst describing the directive as a “nightmare.”

FBI employees also discussed a Jan. 5, 2017 briefing attended by then-President Barack Obama, key members of his administration and then-FBI Director James Comey. Asked how the briefing went, one analyst said “people here are scrambling for info to support certain things and it’s a mad house.”

In one text, an FBI employee said “Trump was right” and the agency’s findings were “still not put together.” On Jan. 3, 2017, Trump suggested on Twitter that the briefing on “Russian hacking” had been delayed in order to build a case.

Days later on Jan. 10, an FBI employee said analysts had “all went and purchased professional liability insurance” amid concerns that leaks could expose details about the investigation.

“The whole thing is pretty ugly…we shall see how things pan out,” one FBI employee wrote.

CLICK HERE TO GET THE FOX NEWS APP

Flynn resigned just 24 days after becoming Trump’s national security adviser. He twice pleaded guilty to lying to FBI investigators about his conversations with Russian officials but withdrew his latest guilty plea earlier this year.

U.S. District Judge Emmet Sullivan is challenging the Justice Department’s dismissal of charges against Flynn.

Last month, a federal appeals court rejected Flynn’s effort to force Sullivan to dismiss the charges. The court also rejected a push to remove Sullivan from the case for alleged bias.