Former French president Nicolas Sarkozy has been freed from prison only 20 days into his "nightmare" sentence after a judge ordered his release.
A Paris appeals court decided he should be placed under judicial supervision pending appeal. He was released within hours of the decision.
Monday's announcement came less than three weeks after Sarkozy began serving a five-year sentence for criminal conspiracy over a plan for late Libyan dictator Col Muammar Qaddafi to fund his 2007 electoral campaign.
Sarkozy, 70, will be banned from leaving French territory and from contacting key people including co-defendants and witnesses in the case, the court said. His lawyer said the next process would be to prepare an appeal against the conviction. An appeal trial would probably take place next spring.
Sarkozy, France's right-wing leader from 2007 to 2012, became the first former French head of state in modern times to be sent behind bars after his conviction on September 25. He denies wrongdoing.

During Monday's hearing, Sarkozy, speaking from La Sante prison in Paris by video conference, spoke about his time behind bars, describing the experience as "gruelling".
"I had never imagined I would experience prison at 70. This ordeal was imposed on me and I lived through it. It’s hard, very hard,” he said.
For security reasons, he had been held in solitary confinement. He paid tribute to prison staff whom he said helped him through “this nightmare". Sarkozy’s wife, model-turned-singer Carla Bruni-Sarkozy, and two of his sons attended the hearing at the Paris courthouse.
Regarding any restrictions the court may put on his release, he said: "I'm French, sir. I love my country. I’m fighting for the truth to prevail. I will comply with all the obligations imposed on me, as I always have."
Monday’s proceedings did not involve motives for the sentencing. However, Sarkozy told the court he never asked Libya’s long-time ruler Col Muammar Qaddafi for any financing. “I will never admit something I didn’t do,” he said.
'Exceptional gravity'
Presiding judge Nathalie Gavarino had said during sentencing that the offences were of “exceptional gravity” and therefore ordered Sarkozy to be jailed even if he filed an appeal.
Prosecutors said his aides, acting in Sarkozy's name, struck a deal with Qaddafi in 2005 to illegally fund his victorious presidential election bid two years later.
Investigators believe that in return, Qaddafi was promised help to restore his international image after Tripoli was blamed for the 1988 bombing of a passenger jet over Lockerbie, Scotland, and another over Niger in 1989, killing hundreds of passengers.
As he entered prison in October, Sarkozy declared: “It is not a former president of the republic being jailed this morning but an innocent man. I have no doubt. The truth will prevail.”
He told Le Figaro newspaper he would be taking into prison a biography of Jesus and a copy of The Count of Monte Cristo, a novel about an innocent man who is jailed but escapes to take revenge, as well as 10 family photos.

Legal battles
Sarkozy has faced several legal battles since leaving office. Last year, France's highest court upheld a conviction for corruption and influence peddling, ordering him to wear an electronic tag for a year, a first for a former French head of state. The tag has since been removed.
Also last year, an appeals court confirmed a separate conviction for illegal campaign financing over his failed re-election bid in 2012. A final ruling from France's highest court is expected on that case this month.
Sarkozy is also under formal investigation in another case for being an accessory to witness tampering.



