Former French president Nicolas Sarkozy has been released from jail, three weeks into a five-year prison term for taking part in a criminal conspiracy. He will be subject to strict judicial supervision and barred from leaving France ahead of an appeal trial due to be held next year.

On 21 October, the former centre-right president, 70, was sentenced to five years for conspiring to fund his 2007 election campaign with money from late Libyan dictator Muammar Gaddafi.

His legal team immediately filed a request seeking his release.

Writing on social media after the release, Sarkozy stated his energy is focused solely on the single goal of proving my innocence. He added, The truth will prevail... The end of the story is yet to be written.

Sarkozy's car was seen leaving La Santé prison in Paris just before 15:00 (14:00 GMT), less than an hour-and-a-half after the court agreed to his early release. Soon after, he was seen arriving at his home in western Paris.

Christophe Ingrain, one of Sarkozy's lawyers, hailed his client's release as a step forward and said they would now be preparing for the appeal trial expected in March.

One condition of Sarkozy's release is he does not contact any other witnesses in the so-called Libyan dossier or any justice ministry employees. During his incarceration, he was visited by Justice Minister Gérald Darmanin, which prompted a complaint from 30 French lawyers highlighting a conflict of interest.

Sarkozy described his solitary confinement as gruelling and declared he had never sought money from Gaddafi. He also expressed gratitude towards prison staff for their humanity during his time there.

Sarkozy is the first French ex-leader placed behind bars since World War Two Nazi collaborationist leader Philippe Pétain was jailed for treason in 1945. His prison conditions included a toilet, a shower, a desk, a small electric hob, a small TV, and limited exercise time.

Sarkozy continues to face legal scrutiny as he navigates his various convictions and appeals, having previously worn an electronic tag after a bribery conviction.