Former French president Nicolas Sarkozy has been accused of taking illegal donations from heiress Liliane Bettencourt

Former French president Nicolas Sarkozy has been formally placed under investigation over claims that he illegally took donations from the country's richest woman on the way to his 2007 election victory.

A judge has filed preliminary charges in a campaign finance case after Mr Sarkozy, 58, went through hours of questioning in a Bordeaux courthouse, according to the prosecutor's office.

The ex-president is accused of "abuse of someone in an impaired state" in the case involving L'Oreal cosmetics fortune heiress Liliane Bettencourt, who is now 90.

Under French law, preliminary charges mean the investigating magistrate has reason to believe wrongdoing was committed, but allows more time to investigate. The charges may later be dropped or could lead to a trial.

Mr Sarkozy potentially could join his predecessor and former mentor, ex-President Jacques Chirac, who was convicted after office.

In a political financing scandal of his own, he became in 2011 the only former French leader since Second World War-era Nazi collaborator Marshal Philippe Petain to be charged or convicted of a crime.

The charges are unlikely to have any immediate political impact, as the conservative Mr Sarkozy said his political career was over and assumed a low profile after losing his re-election bid to Socialist Francois Hollande in May.

While some polls suggest Mr Sarkozy is the mainstream right's favoured candidate in the next presidential race, it is not until 2017.

However his troubles were likely to take the media spotlight off the political scandal that hit Mr Hollande's government this week, with the resignation of Budget Minister Jerome Cahuzac over allegations that he moved cash abroad to avoid paying French taxes.

The investigation in Bordeaux centres on the finances of Ms Bettencourt, who was once the focus of a long-running family feud over her fortune. Ms Bettencourt, who was reported to suffer from Alzheimer's disease, has since been placed under legal protection.