Michael Flynn, former Trump national security adviser, exits federal court in Washington last month. (Andrew Harrer/Bloomberg News)

Michael Flynn will not testify against his former business partner at a trial starting in Alexandria federal court next week because prosecutors no longer believe his version of events, according to recently unsealed court filings.

The judge who will decide Flynn’s sentence in D.C. federal court quickly asked the Justice Department to explain how the decision in Virginia will affect Flynn’s case there.

Flynn, President Trump’s onetime national security adviser, had promised full and truthful cooperation with the government when he pleaded guilty in 2017 to lying to the FBI in a case brought by the special counsel investigating Russian interference in the 2016 election. His sentencing before U.S. District Judge Emmet G. Sullivan of the District has been on hold pending that cooperation.

The decision by prosecutors could imperil Flynn’s ability to avoid incarceration unless he is pardoned by Trump.

When Flynn was first set to be sentenced last year, Sullivan berated him for his entanglement with both Russian and Turkish interests.

“Arguably, you sold your country out,” Sullivan said, adding that he might send Flynn to jail.

Flynn’s lawyers asked for proceedings to be delayed so Flynn could continue to cooperate with prosecutors in hopes of a probationary sentence — a request recently renewed specifically so he could testify at the Virginia trial of Bijan Rafiekian, with whom he ran a consulting business.

Several weeks ago, Flynn fired the law firm that oversaw his plea and most of his cooperation and hired Sidney Powell, a conservative critic of the Justice Department.

In a statement, Powell said that “General Flynn is still cooperating with the government even if they don’t call him as a witness.”

The newly unsealed filings include an email that Assistant U.S. Attorney James P. Gillis ended by saying prosecutors “do not necessarily agree” with Flynn’s “characterizations” of how he came to make an inaccurate filing under the Foreign Agent Registration Act for an influence campaign involving Turkey. According to the email, Flynn says he did not provide false information to his attorneys at the time, did not read the FARA filing before signing it and was not aware that it contained falsehoods.

In their response, Rafiekian’s lawyers say they “interpreted the email’s final sentence as a euphemism for, ‘we’ve concluded [Flynn] is lying.’ ”

Prosecutors said they now consider Flynn a co-conspirator — a legal distinction that would allow them to introduce his prior statements at trial.

Late Tuesday, Judge Anthony J. Trenga ruled that at this point, Flynn could not deemed a co-conspirator in the case. Trump tweeted the news Tuesday night, implying he considered it a victory for his former advisor. But Trenga’s ruling did not rest on any evaluation of Flynn’s cooperation or level of candor; instead he found that the government had failed to provide enough evidence that a conspiracy existed.

The judge noted that “evidence from Flynn” is “notably absent” from the government’s argument and said he may change his ruling as evidence comes in at trial.

In federal court in the District, Flynn admitted lying to the FBI about his contacts with Russians and to making false statements to the Justice Department through his consulting firm about a 2016 campaign against exiled Turkish cleric Fethullah Gulen. He acknowledged “materially false statements and omissions” about the Turkish government’s role in the project and was expected to testify that the obfuscation was intentional.

But lawyers for Flynn say in the unsealed documents that while “with some hindsight” their client understands that the filing contained falsehoods about Turkey’s role, he cannot honestly say he was “knowing and intending” to lie.

“This is a complex area of law about which he knew nothing,” they wrote.

Prosecutors called Flynn’s position a “reversal” and “surprising.”

Rafiekian, who also goes by Bijan Kian, is charged with acting as a foreign agent without permission and conspiring to do so by lying in the FARA filing.His trial is set to begin July 15.

Rafiekian has maintained his innocence, saying he and Flynn were acting on legal advice and their own understanding of the project when they identified their client as a Dutch firm called Inovo BV rather than the Turkish government.

Prosecutors say the leader of that firm, Turkish-Dutch businessman Ekim Alptekin, acted as a cutout to avoid direct ties with Turkey. He is charged in the case but remains abroad.

The influence campaign attracted the notice of the Justice Department when Flynn, the day before the 2016 election, published an op-ed in the Hill newspaper calling Turkey “vital to U.S. interests” and Gulen a “shady Islamic mullah.” The Turkish government has for years without success sought extradition of Gulen from Pennsylvania.

Spencer S. Hsu contributed to this report.