Image copyright Reuters Image caption Michael Flynn arrives at court on Tuesday

A judge has suggested US President Donald Trump's former national security adviser sold out his country when he lied to the FBI about Russia contacts.

Michael Flynn was due to be sentenced, but his lawyers opted for a delay after the judge's blistering comments.

Flynn pleaded guilty in December 2017 to lying about his contacts with the Russian ambassador to the US.

He is the first Trump administration figure to face sentencing in the probe into alleged Kremlin election meddling.

Hours before Flynn turned up for the hearing in Washington DC, President Trump tweeted to him: "Good luck today in court."

The Republican president regularly lambasts the US justice department investigation into whether he or his aides colluded with an alleged Russian plot to sway the 2016 US election in Mr Trump's favour.

What happened in court?

Flynn was due to learn his fate on Tuesday, but after delivering a stern rebuke the judge offered the former national security adviser's legal team a postponement.

The attorneys agreed, and Judge Emmet Sullivan rescheduled the sentencing to 13 March.

Special Counsel Robert Mueller, who is leading the Russia investigation, had asked for Flynn to be spared prison time.

Mr Mueller's office cited Flynn's "substantial" co-operation with the inquiry and career of military service.

Image copyright Getty Images Image caption Supporters of Flynn chanted outside the court as he arrived

However, Judge Sullivan told Flynn: "This is a very serious offence.

"A high-ranking senior official of the government making false statements to the FBI while on the physical premises of the White House."

At one point, Judge Sullivan asked the prosecutor whether the special counsel's office had ever considered charging Flynn with treason.

The judge told Flynn: "Arguably, you sold your country out."

Judge Sullivan also said he "can't hide my disgust, my disdain" for the offence.

Image copyright Getty Images Image caption Flynn (far right) is seen during a presidential call with Russia's Vladimir Putin in 2017

Flynn reaffirmed his guilt in court and said he "was aware" at the time of his FBI interview that lying to them was a crime.

Last week, his legal team had argued that investigators never made clear to him it was a crime to lie, and had discouraged him from having a lawyer present.

But prosecutors had hit back in court documents: "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."

In a Fox News interview on Tuesday, White House spokeswoman Sarah Sanders said Flynn had been "ambushed" by FBI agents who "broke every standard protocol they have".

A small group of protesters were outside court, holding a large inflatable rat, while other demonstrators showed up in support of Flynn.

What did Flynn do?

The retired US Army three-star lieutenant general lied to FBI agents about his conversations with the Russian ex-ambassador to the US, Sergei Kislyak.

He falsely told investigators in January 2017 that he had not discussed US sanctions against Moscow with Mr Kislyak before Mr Trump had taken office, according to his plea agreement.

Flynn also lied about his request to Mr Kislyak that Russia delay or block a vote at the United Nations on a resolution condemning Israeli settlements.

He was also accused of conducting illegal paid lobbying for Turkey during the US presidential campaign.

But Flynn was left off Monday's indictment of two of his business partners for illegally working for Turkey.

Prosecutors said on Tuesday that Flynn could have been charged in that case, but for his "substantial assistance".

Smooth sailing? Not quite

Today was supposed to be a relatively smooth day. Michael Flynn would appear in court and, in all probability, receive a sentence for lying to the FBI that included no prison time.

That's what the special counsel's office recommended, due in large part to the former national security advisor's co-operation with the Russian election-meddling probe. That, of course, is what Flynn's lawyers wanted.

It turns out Emmet Sullivan had other ideas. Given the district court judge's stern words, it appeared entirely possible Flynn would receive some sort of prison sentence.

That was enough to leave Flynn and his defence team scrambling - and perhaps wondering whether there are other ways he could co-operate, such as in the upcoming trial of two of his business partners accused of acting as unregistered agents of the Turkish government.

This all but guarantees months of additional speculation and conspiracy theories surrounding Flynn and what he did and didn't do; what he does and doesn't know.

This may also make it harder for Robert Mueller's team to strike future plea deals with other parties, given that this judge, at least, seemed uninterested in fully heeding the special counsel's sentencing recommendations.

How is Flynn relevant to the Mueller inquiry?

In addition to the possible collusion line of inquiry, the special counsel is understood to be scrutinising whether Mr Trump or aides sought to obstruct justice by blocking scrutiny of Flynn.

Former FBI Director James Comey has said that Mr Trump asked him: "I hope you can see your way clear to letting this go, to letting Flynn go."

Mr Comey has said he believes the president was trying to shut down the inquiry into Flynn's unlawful contacts with a foreign government.

Mr Trump denies he held any such conversation about Flynn with the former FBI director.

Mr Comey's surprise firing by Mr Trump in May 2017 led to the special counsel being appointed by the US justice department.