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 said his energy is focused solely on the single goal of proving my innocence.

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 shortly before 15:00 (14:00 GMT), less than an hour-and-a-half after a court agreed to his early release. Soon after, he was seen arriving at his home in western Paris.

His lawyer, Christophe Ingrain, hailed the release as a step forward and mentioned they would prepare for the appeal trial expected in March.

One condition of Sarkozy's release is he does not contact 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, prompting complaints from over 30 French lawyers about a potential conflict of interest.

In a court statement made via video link, Sarkozy described his time in solitary confinement as gruelling and a nightmare, asserting he never sought financial assistance from Gaddafi.

Despite the charges, Sarkozy expressed gratitude to certain prison staff for treating him with exceptional humanity. His family, including his wife Carla Bruni-Sarkozy and two sons, were present for support during the court proceedings.

Sarkozy remains a highly notable figure in French politics. His imprisonment marks him as the first French ex-leader to be sentenced to prison since World War Two.