A French appeals court has ruled an investigation can proceed into former president Nicolas Sarkozy on accusations he duped L'Oreal heiress Liliane Bettencourt into donating election campaign funds.

The decision, which could lead to a trial in the long-running scandal, complicates any political comeback by Mr Sarkozy.

He has been dogged for years by the "Bettencourt affair" in which he denies any misconduct.

As the conservative voters' favourite to take on Socialist President Francois Hollande in 2017 after losing to him last year, Mr Sarkozy could suffer if he is tried over allegations of exploiting the mental frailty of France's richest woman.

A lawyer for one of the 12 people investigated in the case said the decision would be appealed to the Cour de Cassation, the country's highest appeals court.

Mr Sarkozy's lawyers, who did not comment on today's decision, have five days to join that appeal.

A final judgment by that court could take many months, but Mr Sarkozy could be called to face trial at any time.

Mr Sarkozy was placed under formal investigation in March for "abuse of weakness" of Ms Bettencourt after she was declared in a state of dementia. He was allegedly seeking funds for his 2007election campaign.

Under French law, a formal investigation means there is "serious or consistent evidence" pointing to likely implication of a suspect in a crime. It often, but not always, leads to trial.

The public prosecutor handling the case recommended in June that it be dropped for lack of evidence.

Investigating magistrates in France can proceed with a formal inquiry over the objections of a prosecutor.

Lawyers argue inquiry could not be viewed as impartial

The appeal court's decision to proceed with the investigation was announced to reporters outside the court in the southwest city of Bordeaux by Nicolas Huc-Morel, the Bettencourt family lawyer.

It was prompted by a challenge mounted in July by lawyers for Mr Sarkozy and 11 others placed under investigation. They contested a 2011 medical report that determined Ms Bettencourt had been suffering from dementia since 2006.

Lawyers argued the formal inquiry could not be viewed as impartial because one of the doctors involved in the report was a friend of the judge who placed Mr Sarkozy under investigation, Jean-Michel Gentil.

Mr Sarkozy has largely stayed out of the limelight since his defeat to Hollande last year, but has dropped hints this year that he is mulling a re-election bid.

Any comeback would hinge on the outcome of the Bettencourt case and a series of other legal cases involving people close to him, including alleged political rigging in an arbitration payout to a high-profile businessman.