Michael Flynn could walk out of a courtroom a free man due to his extensive cooperation with federal prosecutors, but the run-up to his sentencing hearing on Tuesday has exposed raw tensions over an FBI interview in which he lied about his Russian contacts.

The former Trump national security adviser's lawyers have suggested that investigators discouraged him from having an attorney present during the January 2017 interview and never informed him it was a crime to lie. Prosecutors shot back, "He does not need to be warned it is a crime to lie to federal agents to know the importance of telling them the truth."

President Donald Trump signalled his intense interest in the case with a "Good luck" tweet to Flynn on Tuesday. He added: "Will be interesting to see what he has to say, despite tremendous pressure being put on him, about Russian Collusion in our great and, obviously, highly successful political campaign. There was no Collusion!"

Flynn arrived at court on Tuesday for a sentencing hearing that has resurrected public debate about FBI actions in the case. On Monday evening, the dispute - and a judge's intervention - led prosecutors to publicly file a redacted copy of the notes from Flynn's FBI interview that largely bolster the case, showing he told agents things he later said were false.

Still, the mere insinuation of underhanded tactics has been startling given the seemingly productive relationship between the two sides, and it was especially striking since prosecutors with special counsel Robert Mueller's office have praised Flynn's cooperation and recommended against prison time. The defence arguments spurred speculation that Flynn may be trying to get sympathy from Trump or may be playing to a judge known for a zero-tolerance view of government misconduct.

"It's an attempt, I think, to perhaps characterise Flynn as a victim or perhaps to make him look sympathetic in the eyes of a judge - and, at the same time, to portray the special counsel in a negative light," said former federal prosecutor Jimmy Gurule, a University of Notre Dame law school professor.

Until the duelling memos were filed last week, Flynn had cooperated extensively and largely eschewed the aggressive tactics of others involved in the Mueller probe.

Prosecutors, for instance, have accused former Trump campaign chairperson Paul Manafort of lying to them even after he agreed to cooperate. Another potential target, Jerome Corsi, leaked draft court documents and accused Mueller's team of bullying him. And George Papadopoulos, a Trump campaign adviser recently released from a two-week prison sentence, has lambasted the investigation and publicly claimed that he was set up.

But then came Flynn's sentencing memo.

Although Flynn and his attorneys stopped short of any direct accusations of wrongdoing, but they suggested the FBI, which approached Flynn at the White House just days after Trump's inauguration, played to his desire to keep the encounter quiet and as a result kept him from involving a lawyer.

They also insinuated that Flynn deserves credit for not publicly seizing on the fact that FBI officials involved in the investigation later came under scrutiny themselves. Former Deputy Director Andrew McCabe, who contacted Flynn to arrange the interview, was fired this year for what the Justice Department said was a lack of candour over a news media leak. Peter Strzok, one of the two agents who interviewed Flynn, was removed from Mueller's team and later fired for trading anti-Trump texts with another FBI official.

Mueller's team has sharply pushed back at any suggestion that Flynn was duped, with prosecutors responding that as a high-ranking military officer steeped in national security issues Flynn "knows he should not lie to federal agents".

'Very unusual situation'

Trump has made no secret that he sees Mueller's investigation as a "witch hunt" and has continued to lash out at prosecutors he sees as biased against him and those who help them. He's shown continued sympathy for Flynn, though, calling him a "great person" and asserting erroneously last week that the FBI said he didn't lie.

Flynn, who lives in Middletown, Rhode Island, where he and his wife grew up and where they have a deep social network, has not tried to retract his guilty plea, and there's every indication the sentencing will proceed as scheduled.

Arun Rao, a former Justice Department prosecutor in Maryland, said the defence memo is striking because it's "inconsistent" with Flynn's cooperative stance so far.

"You also wonder in this very unusual situation," he said, "whether it is a play for a pardon". It's also possible that at least some of the defence arguments may resonate with US District Judge Emmet Sullivan, who was the judge in the Justice Department's botched prosecution of now-deceased Republican Senator Ted Stevens of Alaska. He dismissed the case after prosecutors admitted that they withheld exculpatory evidence, prompting the judge to say that in nearly 25 years on the bench, "I've never seen anything approaching the mishandling and misconduct that I've seen in this case."

In an opinion piece for The Wall Street Journal last year, Sullivan said the case inspired him to explicitly remind prosecutors in every criminal case before him of their obligation to provide defendants with favourable evidence. He says he has encouraged colleagues to do the same.

In Flynn's case, he directed prosecutors to produce FBI records at the centre of his case, including portions of the notes from his January 24, 2017, FBI interview.

The notes, publicly filed on Monday evening, show that FBI agents interviewed Flynn about his contacts with Russia, including his past trips to the country and his conversations with Sergey Kislyak, then Russia's ambassador to the US.

The notes show Flynn told agents he didn't ask Kislyak not to escalate Russia's response to sanctions imposed by the Obama administration in response to election interference. But Flynn admitted in court papers last year that he did.

The notes also show Flynn told agents he didn't ask Kislyak to see if Russia would vote a certain way on a United Nations resolution involving Israeli settlements. But in court papers last year he admitted that he did ask Kislyak to see if Russia would vote against or delay the resolution. Court papers show Flynn made that request at the direction of Trump son-in-law Jared Kushner.

It's unclear what impact, if any, the notes will have on Sullivan's sentencing decision.