Former Trump national security adviser Michael Flynn asked to withdraw his guilty plea late Tuesday, two weeks before his scheduled sentencing for lying to investigators in the Russia probe, a move that culminated his monthslong retreat from a cooperation agreement with federal prosecutors.

Flynn, a retired Army lieutenant general, accused the government of "bad faith" and "vindictiveness" in arguing that prosecutors broke their cooperation deal with him when they recommended earlier this month he receive a prison sentence of up to six months. The prosecutors' recommendation marked a reversal of their past support for a probation-only sentence. Flynn admitted in 2017 that he lied to investigators about his contacts with Russia's top diplomat to the U.S. during the latest transition.

Flynn's defense lawyers on also asked U.S. District Judge Emmet Sullivan to delay sentencing from Jan. 28 to Feb. 27 to give prosecutors time to respond to his request to rescind his guilty plea.

Flynn fired his defense team at Covington & Burling in June and and hired a new lawyer, Sidney Powell, a former prosecutor and frequent guest on Fox News who railed against Special Counsel Robert Mueller III's investigation into Russian interference in the 2016 presidential election. Flynn's hiring of Powell signaled a pivot from a cooperative to adversarial relationship with prosecutors.

Ahead of a trial in Alexandria, Virginia, where he was expected to appear as a key witness, prosecutors said they no longer planned to call Flynn to testify against a onetime business partner who'd been charged with secretly lobbying for Turkey. Prosecutors said they could no longer trust that Flynn would tell the truth in testifying against his former associate, Bijan Kian, who was charged in connection with their past lobbying work.

In the court filing Tuesday, Flynn's defense team asserted that, in preparation for that trial, prosecutors wanted Flynn to admit he made false statements in a disclosure revealing his work for Turkey to the U.S. government. Flynn's defense lawyers called that would-be testimony "a lie."

Flynn's lawyers lambasted the government's retreat from its earlier support for a non-prison sentence. "The prosecution seeks to rewrite history and send Mr. Flynn to prison," Flynn's lawyers said in Tuesday's filing.

Prosecutors said in their sentencing memo that Flynn "monetized his power and influence over our government, and lied to mask it. When the FBI and DOJ needed information that only the defendant could provide, because of that power and influence, he denied them that information."

The government argued Flynn is no longer entitled to any cooperation credit for the earlier assistance he provided to the Mueller investigators.

Flynn was first scheduled to be sentenced in late 2018, but he asked for a delay after Sullivan suggested that he would hand down a sentence with prison time. His second sentencing date, in December 2019, was delayed in anticipation of the Justice Department inspector general's much-anticipated report on the Russia investigation.

The inspector general found that the FBI was justified in opening the Russia investigation but uncovered numerous missteps, including evidence that a bureau lawyer altered an email used in seeking surveillance of former Trump campaign adviser Carter Page.

Any successful effort by Flynn to withdraw his guilty plea would set up a trial in Washington federal district court, the venue for various other Mueller-related cases.