* Investigated for "abuse of weakness" related to heiress
* Formal investigation final step before accusation of crime
* Case could scupper 2017 presidential comeback plans
* Sarkozy has repeatedly denied allegations
Ex-French president Nicolas Sarkozy was placed under formal investigation on Thursday for "abuse of weakness" in a 2007 party funding case involving elderly L'Oreal heiress Liliane Bettencourt, the public prosecutor said.
The risk for Sarkozy, unseated May last year but considered a potential conservative candidate in the 2017 presidential race, is that he may end up plagued by suspicion for months or years, even if his lawyer says there is no case against him.
Under French law, a formal investigation is the final step before a suspect is accused of a crime. Sarkozy, who only this month hinted he could make a political comeback, repeatedly has denied taking campaign funds from Bettencourt.
"Nicolas Sarkozy, who benefits from the presumption of innocence, had been notified that he has been placed under formal investigation for taking advantage of a vulnerable person in February 2007 and during 2007 to the detriment of Liliane Bettencourt," the prosecutor in the southwestern city of Bordeaux said in a statement after a hearing.
The 90-year-old Bettencourt is France's richest woman. Sarkozy, who lost last year's election to Socialist Francois Hollande, faced members of her staff at the hearing earlier on Thursday.
French TV channel BFM quoted Sarkozy's lawyer Thierry Herzog saying the decision was "incoherent and unjust" and he would appeal.
If found guilty, the 57-year-old Sarkozy faces a maximum three-year jail sentence and a hefty fine.
But the damage to his political career could be irreversible. He gave the strongest hint yet that he might make a comeback bid earlier this month, telling a magazine a sense of duty to fix the economy might oblige him to run in 2017.
Sarkozy's remarks in the right-leaning weekly Valeurs Actuelles increased speculation he could return to politics - talk that has not abated since the conservative was ousted by Hollande.
A poll published on March 18 showed Sarkozy was the overwhelming favourite among conservative voters to run for president and for the first time since November 2011, a survey the same week said he also was now more popular than Hollande among the French.
The news of the investigation will provide some respite for Hollande who is being battered in the polls for his handling of the economy and was embarrassed this week when budget minister and cabinet heavyweight Jerome Cahuzac was forced to resign over a tax-fraud inquiry.
Sarkozy's former industry minister Christian Estrosi said there was a "political stench" to the decision.
"Everybody will notice that this happened 48 hours after a Socialist minister was called into question, probably to compensate for that," he said in a statement.
Sarkozy was questioned in November by judges, but they opted not to open a full-blown inquiry.
Initial suspicions over funding were fuelled three years ago when a woman who worked as an accountant for the mentally frail Bettencourt alleged that a large cash withdrawal was earmarked for Sarkozy's presidential election campaign.
Bettencourt was declared in a state of dementia in 2006 and was placed under the guardianship of her family in 2011.
Bettencourt's family has long had close connections with the UMP party of Sarkozy, who lost presidential immunity when he left office.
The Bettencourt affair is not the only cloud on the horizon.
Lawyers also are demanding that Sarkozy explain himself in two other cases. One is about the terms of a submarine sale to Pakistan and another concerns lavish spending on opinion polls by his office when he was president.