Curtains for Mr Sarkozy's ambitious reform plans?
Voters in France's local elections have handed key cities to the left in a punishing blow to President Sarkozy.
The Socialists seized Toulouse, Caen, Strasbourg, Amiens and Reims, with most results in. They also held on to the power bases of Paris and Lyon.
But in a closely-fought contest, the president's centre-right UMP retained the second city, Marseille.
The outcome is likely to make it harder for Mr Sarkozy's government to pursue its reform programme, analysts say.
The poll was seen as the first ballot box test since Mr Sarkozy's election last May of his popularity, which has plummeted in recent opinion polls.
The BBC's Emma-Jane Kirby in Paris says that in terms of the share of the vote, these election results do not look too bad for the government - the opposition Socialists won only a very small percentage more of the vote than the UMP.
Nationally, partial official results showed parties on the left leading slightly, with 48.7% of the overall vote to 47.6% for the centre-right, according to AP news agency.
But our correspondent adds that in losing major cities, the UMP has lost some key power bases and it may be more difficult now for the French leader to push through reforms.
'Divorce' with electorate
At Perigueux, in the Dordogne, Mr Sarkozy's minister for education, Xavier Darcos, lost his bid to be re-elected as mayor by just over 100 votes.
Segolene Royal called the results a "vote of hope"
On Sunday night, the president did not make an appearance - leaving his prime minister, Francois Fillon, to defend his policies in a televised declaration.
"You can't change a great country like ours in a few months," said Mr Fillon. "Tenacity is needed to reform."
Segolene Royal, the Socialist presidential candidate Mr Sarkozy defeated last May, called Sunday's results "a vote of hope".
Former Socialist Prime Minister Laurent Fabius said the government was heading for "divorce" with the French electorate if it refused to change its policies.
The elections saw Paris Mayor Bertrand Delanoe boost his position as a possible contender against Segolene Royal for the presidential elections in 2012.
However, analysts say the Socialists remain in some disarray, having lost three presidential elections in a row.
Our correspondent in Paris says many have used their votes to show their disapproval of the government.
The left won a tiny percentage more of the vote than the UMP
Many French voters say they are angry Mr Sarkozy has not yet fulfilled his promise to increase their spending power.
Since coming to power, he has succeeded where some of his predecessors in the Elysee Palace have failed by reducing pension benefits for some state workers.
Although unemployment has dropped to its lowest level in more than two decades, it remains high at 7.5% and analysts warn the French economy shows signs of minimal growth.
Correspondents say Mr Sarkozy's recent divorce three months into his presidency and remarriage to supermodel Carla Bruni have turned off many voters.
The 53-year-old's well-publicised holidays with the rich and famous and what some see as his extravagant style have seen him dubbed the "Bling-Bling president".
Fewer than four in 10 voters now approve of his performance. Last July his ratings stood at 67%.