Washington (CNN) Former national security adviser Michael Flynn, whom federal prosecutors recently said should go to jail for lying to the FBI in the early days of the Trump administration, has asked a judge to allow him to withdraw his guilty plea.

He was set to be sentenced in two weeks after pleading guilty to lying as part of the Robert Mueller special counsel investigation . He is now asking to delay his sentencing.

His attorneys, in their court filing on Tuesday night, accuse prosecutors of "bad faith, vindictiveness, and breach of the plea agreement."

"The prosecution seeks to rewrite history and send Mr. Flynn to prison," his lawyers wrote.

The judge in the case, Emmet Sullivan of the DC District Court, previously considered some similar accusations , shooting them down. Sullivan would have to approve Flynn unraveling his plea deal.

At very least, Flynn's legal attempt Tuesday night could further drag out a case that's taken several twists since Mueller opened it more than two years ago, lining up Flynn as a key witness against the President. Since then, Flynn admitted to his lies under oath and shared several damaging details about the President with investigators, but then gradually tried to walk back his admissions in an attempt to avoid prison.

Flynn had told two federal judges during court hearings that he intended to plead guilty and understood his admissions. Yet on Tuesday, his lawyers wrote that he is "innocent" and "will not plead guilty."

Their main issue: Prosecutors' revised their sentencing request, telling a judge two weeks ago Flynn deserved up to six months in prison after he didn't help them at the trial last summer of his former lobbying partner.

Prosecutors, as the Mueller investigation neared its end, originally said Flynn's cooperation was substantial and that he deserved as little as no jail time, which is what he seeks.

"It would constitute ineffective assistance of counsel to fail to move to withdraw his plea now in light of the government's breach and change in sentencing recommendation," their filing states.

Flynn's legal team, headed by the Texas-based Mueller critic Sidney Powell, has spent the past half year working toward unraveling his guilty plea, pushing conspiracy theories in court -- with no success -- about the FBI's approach to Flynn, and advocating on Twitter for a presidential pardon.

His lawyers had previously indicated in court filings that they wanted the judge to dismiss the charge against Flynn, but they have not formally asked for it. Sullivan didn't sign off on those requests, and he denied their separate request to hold prosecutors in contempt for the way they handled Flynn's case. Sullivan also ruled that Flynn wasn't entitled to see more documents in his case.

In addition to criticizing the prosecutors, Flynn's legal team on Tuesday pointed fingers at the lawyers who had led their client through his plea deal with Mueller.

Lawyers from the influential Washington firm Covington & Burling had represented Flynn until last summer, ushering him through his cooperation with Mueller's investigations into Russian election interference and obstruction of justice. In addition to helping Mueller, Flynn testified before a grand jury against his former lobbying firm's work and about ex-lobbying partner, Bijan Kian, whom prosecutors took to trial for illegal foreign lobbying in Northern Virginia federal court. A judge acquitted Kian because prosecutors failed to present enough evidence to prove the case.

Flynn had not testified at the trial because prosecutors could not rely on what Flynn would say on the stand.

Flynn's lawyers focus in their filing Tuesday on his admission regarding Turkish lobbying. As part of his guilty plea, he also admitted to making false statements in a lobbying disclosure about his private work for Turkey. He admitted to this during his plea in court, but it was not included in the criminal count against him.

"The prosecution has shown abject bad faith in pure retaliation against Mr. Flynn since he retained new counsel. This can only be because with new, unconflicted counsel, Mr. Flynn refused to lie for the prosecution," they wrote.

Powell's team suggests Covington on Tuesday made mistakes in Flynn's lobbying filing, and maintain that Flynn had been truthful with them when they prepared that lobbying filing.

Flynn's attorneys also wrote that after the lawyer change, prosecutors dropped him as a witness against his ex-lobbying partner and retaliated against him because he would not testify to making the errant filing.

"He rightly refused to lie for the government, and his new counsel would not allow him to do so, nor allow the government to bully him into acquiescence," Flynn's attorneys wrote. "It is beyond ironic and completely outrageous that the prosecutors have persecuted Mr. Flynn, virtually bankrupted him, and put his entire family through unimaginable stress for three years."

This story has been updated with additional details from the court filing.