When he walked out of the Elysee Palace after a humiliating election defeat vowing never to return, Nicolas Sarkozy's political career appeared to be dead and buried.

But in less than 18 months, Sarkozy has enjoyed a phenomenal resurgence, now ranking among the country's most popular politicians and widely touted as the right's best chance for retaking the presidency in 2017.

And while he still faces a slew of other legal probes, the decision by investigating judges to drop illegal campaign financing charges against Sarkozy has swept away a key obstacle to his potential comeback.

The decision will come as a huge relief to Sarkozy and the many supporters who see him as the only candidate capable of defeating the ruling Socialists in the 2017 presidential and parliamentary elections.

Sarkozy's loss to Socialist Francois Hollande in last year's presidential vote was hardly unexpected -- the right-winger's flashy style and failure to prop up France's struggling economy had left him deeply unpopular.

But Hollande has since suffered a steep drop in public opinion polls -- becoming the least-popular president in modern French history -- while Sarkozy has enjoyed a surprising resurrection.

Sarkozy has not yet officially announced a return to politics but his right-wing UMP party has struggled to find a replacement who can attract the same fierce loyalty he inspires.

In a poll of public confidence by TNS Sofres last week, Sarkozy came second only to popular Interior Minister Manuel Valls, with 35 percent of respondents choosing the former president as the best person to play an "important role" in running the country.

In the same poll, 74 percent of those surveyed said they had no confidence in Hollande.

Sarkozy's legal woes are hardly over with the dropping of the campaign financing charges, which accused him of taking advantage of France's richest woman, the aged L'Oreal heiress Liliane Bettencourt.

French judges are still investigating alleged kickbacks on a Pakistani arms deal struck when Sarkozy was budget minister, amid suspicions the funds were channelled to then prime minister Edouard Balladur's unsuccessful 1995 presidential bid.

Sarkozy's name is also at the centre of probes into whether his 2007 campaign accepted money from former Libyan strongman Moamer Kadhafi and whether his office used public funds to carry out political opinion polls.

But none of these cases had the potential of the Bettencourt probe to do him serious political harm.

Sarkozy has largely stayed out the limelight since his defeat last year, though he emerged in July to make a plea for donations after his party was denied millions of euros in campaign reimbursements.

He also resigned from the prestigious Constitutional Council over its decision to uphold a decision that his campaign exceeded official spending limits.

It was a typical dramatic flourish for the 58-year-old Sarkozy, who has made a career of shaking up the often staid world of French politics.

'Bling-bling' and supermodel wife

The son of a Hungarian immigrant, Nicolas Sarkozy de Nagy-Bosca burst onto the political scene as a town mayor at 28, an MP at 34 and minister at 38.

Sarkozy won the presidency at only 52 and was initially seen as a much-needed breath of dynamism, making a splash on the international scene and wooing the corporate world.

Breaking a longstanding taboo, Sarkozy also put his private life on display, divorcing his second wife while in office and publicly wooing supermodel and singer Carla Bruni.

He married Bruni in 2008 and the two had a daughter, Giulia, a few months before the 2012 election.

But as France's economy floundered amid the wider eurozone economic crisis, Sarkozy's public image took a beating.

His so-called "bling-bling" style -- the seeds of which were laid with a champagne-soaked election night party at a glitzy Champs Elysees restaurant -- provoked outrage as incomes fell and job losses mounted.

Photographs of Sarkozy wearing Rolex watches and vacationing with the country's business elite also fed allegations of cronyism and accusations that he was out of touch.

Hollande, a mild-mannered Socialist party apparatchik, seemed the perfect antidote when French voters went to the polls last year.

With polls showing a clear Hollande victory, Sarkozy made a desperate attempt to hang on, flirting with far-right ideas and warning of economic chaos under the Socialists.

But he was unable to overcome deep-rooted antagonism and became the first French head of state not to secure a second term in three decades.

Sarkozy has since returned to his corporate law practice and lectured on the international circuit, while his lawyers work to clear the backlog of cases against him.