Former French president Nicolas Sarkozy will be granted early release 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.

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 lawyers immediately filed a request seeking his release, pending an appeal trial next March.

Sarkozy could be freed from La Santé prison as early as Monday evening.

Speaking to a court in Paris via video link, Sarkozy described his time in solitary confinement as gruelling and a nightmare.

Public prosecutor Damien Brunet recommended that Sarkozy's request for release be granted but that the former president be banned from contacting other witnesses in the so-called Libyan dossier.

Sarkozy, who has always denied any wrongdoing, told the court via video link that he had never had the mad idea of asking Gaddafi for money and stated he would never admit to something I haven't done.

Sarkozy also paid tribute to prison staff who had made his time in prison bearable. They have shown exceptional humanity, he said.

Sarkozy's wife, the singer and model Carla Bruni-Sarkozy, and two of the former president's sons were present in the courtroom to support him.

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.

Since entering prison, Sarkozy has been held in a cell in the isolation wing. Two bodyguards have been stationed in nearby cells.

The former president of the republic is entitled to protection because of his status, interior minister Laurent Nuñez said in October, adding that there was obviously a threat against him.

Sarkozy was president from 2007-2012. Ever since he left office, he has been dogged by criminal inquiries and for months had to wear an electronic tag around his ankle after a conviction last December for trying to bribe a magistrate for confidential information about a separate case.