WASHINGTON — Federal prosecutors recommended on Tuesday that President Trump’s former national security adviser Michael T. Flynn be sentenced to up to six months in prison for lying to investigators in the Russia inquiry, a reversal that came after he backed off his cooperation deal and began suggesting that he had not committed any crimes.

The recommendation is a setback for Mr. Flynn, a retired Army lieutenant general and former head of the Defense Intelligence Agency whose guilty plea marked a stunning downfall. He went on to provide extensive information to prosecutors, who in turn recommended leniency in late 2018. But Mr. Flynn grew increasingly antagonistic over the past year, and they revised their position.

“Far from accepting the consequences of his unlawful actions, he has sought to blame almost every other person and entity involved in his case, including his former counsel,” prosecutors wrote. “The defendant has also chosen to reverse course and challenge the elements and circumstances of his false statements to the F.B.I.”

Mr. Flynn had pleaded guilty in late 2017 to lying to the F.B.I. about his conversations with the Russian ambassador to the United States and faced up to six months in prison. Mr. Flynn’s decision to help the special counsel’s office was an important milestone for investigators trying to determine whether any Trump associates had conspired with Russia’s 2016 election interference. Prosecutors once praised Mr. Flynn’s assistance, saying it “was particularly valuable because he was one of the few people with long-term and firsthand insight regarding events and issues under investigation.”