President Sarkozy's private life has been headline news
French PM Francois Fillon has said the government will press ahead with President Nicolas Sarkozy's reform plan despite setbacks in local elections.
Partial results from Sunday's first round put Mr Sarkozy's ruling UMP conservative party at 45.5%, with the opposition socialists at 47%.
The vote is seen as a test of Mr Sarkozy's first year in office. His popularity has fallen in recent months.
But the socialists' lead is smaller than some analysts have predicted.
The decisive second round run-offs are to be held on 16 March, and the outcome - particularly in several large cities - remains finely balanced.
Some 44 million French voters are choosing mayors and local councillors in about 37,000 cities, towns and villages.
"We will hold our course on reform," Mr Fillon said on Sunday night.
He also accused opponents of exacerbating tensions at a national level, saying it was an attempt to gain advantage on the local stage.
"What is at stake today is the management of our towns, villages and provinces," Mr Fillon said.
UMP head Patrick Devedjian admitted the results were "not good".
Socialist leader Francois Hollande said voters had sent "a warning" to Mr Sarkozy and the government over its policies.
But he added: "Everything remains open. Nothing has been won or lost."
The socialists are expected to hold on to power in Paris and Lyon, and exit polls suggested they could also take Marseille, Strasbourg and Toulouse from Mr Sarkozy's party.
Until Sunday, Mr Sarkozy's party held 55% of all cities and towns, following the last municipal polls in 2001.
The BBC's Alasdair Sandford in Paris says that the vote is being seen as one of disapproval over Mr Sarkozy's first 10 months in power.
Many French people have complained that promised reforms have failed to improve their standard of living, while the president's high-profile private life raised concerns among some that he was neglecting his public duties, our correspondent says.
In a recent interview with Le Figaro newspaper, Mr Sarkozy played down the expected UMP losses.
"The crucial date for me is the end of my term [in 2012]," he said.
He has insisted there will be no cabinet reshuffle, and that his reform programme will go ahead regardless.
The president's approval ratings reached 67% in July last year.
But recent opinion polls suggest up to two-thirds of French voters now disapprove of his policies.