PARIS, May 6 Nicolas Sarkozy, the passionate, pugnacious son of a Hungarian immigrant, was elected president of France on Sunday, promising a break with the past, a new style of leadership, and a renewal of relations with the United States and the rest of Europe.
Mr. Sarkozys triumph over Ségolène Royal, the Socialist candidate, was a huge blow to her party and dashed her dream of becoming the countrys first female president. But Ms. Royal tried to rally her supporters, telling them French politics had forever changed with her candidacy.
With the entire vote counted, Mr. Sarkozy had 53.1 percent and Ms. Royal 46.9 percent, according to official Interior Ministry figures.
Ms. Royal had repeatedly appealed to the women of France to vote for her in a show of female solidarity. But Mr. Sarkozy, a conservative who made his reputation as a hard-line minister of the interior, got the majority of the womens vote, according to Ipsos, an international polling company.
Its telephone poll showed that the youngest voters supported Ms. Royal, artisans, shopkeepers and rural voters preferred Mr. Sarkozy, and city dwellers were divided. Mr. Sarkozys strongest support came from voters 60 years and older.
His victory set off scattered anti-Sarkozy violence in Paris and some other cities, but for the most part France stayed calm.
Turnout was exceptionally high. Eighty-four percent of Frances 44.5 million registered voters cast ballots, about four percentage points higher than the level five years ago.
In an emotional acceptance speech to thousands of cheering supporters in a rented concert hall in the chic Eighth Arrondissement, Mr. Sarkozy (pronounced SAR-ko-zee) renewed his campaign pledge to break what he called the old, outmoded habits of France.
The French people have chosen change, Mr. Sarkozy declared. I will implement that change. Because that is the mandate I received and because France needs change.
He vowed to break with the ideas, the habits and the behavior of the past and to rehabilitate work, authority, morality, respect and merit. Mr. Sarkozy has pledged to remake France by, among other things, slashing unemployment, cutting taxes, keeping trains running during strikes, making people work harder and longer, shrinking the government bureaucracy, reforming pension rules and making it easier to create new businesses.
Widely criticized in France for his strong pro-American sentiments, Mr. Sarkozy sought in his acceptance speech to strike a balanced approach to the United States.
Addressing Frances American friends, he said, I want to tell them that France will always be by their side when they need her, but that friendship is also accepting the fact that friends can think differently. .
He specifically criticized the United States for obstructing the fight against global warming, which he said would be a high priority.
President Bush telephoned Mr. Sarkozy to congratulate him, saying he looks forward to working with president-elect Sarkozy as we continue our strong alliance, Gordon D. Johndroe, a White House spokesman, said in a statement.
Foreshadowing activism in the world, Mr. Sarkozy called for a new union of the Mediterranean region, vowed to fight poverty, tyranny and oppression, and forge a new role for the European Union, declaring, Tonight, France is back in Europe.
He also struck a conciliatory note, reaching out to the huge swath of French people who seem to fear him, especially in the countrys ethnically and racially mixed suburbs, where he is accused of fueling tensions with his provocative language and an aggressive police presence.
To all those French who did not vote for me, I want to say, beyond political battles, beyond differences of opinion, for me there is only one France, Mr. Sarkozy said. I want to tell them that I will be president of all the French.
In conceding defeat at her campaign headquarters on the Left Bank, Ms. Royal acknowledged the sadness and pain of her supporters, whom she thanked for their efforts.
The voters have spoken, Ms. Royal said. I hope the next president will fulfill his mission in the service of all the French people.
But she also said the election campaign had changed the French left forever, hinting at disarray in her party and suggesting the Socialists may seek to form an alliance with the large following of François Bayrou, the centrist candidate. Something rose up that will not stop, she said, adding, You can count on me to deepen the renewal of the left.
She never mentioned Mr. Sarkozy by name.
With his raw, often divisive rhetoric, Mr. Sarkozy will have to change course to neutralize deep-rooted hostility against him, particularly in the tough ethnic suburbs.
About 2,000 people gathered at Place de la Bastille in central Paris to await the election results, with some burning an effigy of Mr. Sarkozy before tearing it apart.
But within two hours of the polls closing, the scene had degenerated into violent clashes between the police and several hundred people in the crowd who smashed windows and set one vehicle on fire.
By midnight, the square was shrouded in tear gas, with riot police officers cowering from paving stones pitched by young men. Bursts of police water cannons followed.
Police everywhere, justice nowhere! some protesters shouted. Others yelled, Sarko, Fascist! The people will get you! The base of the Bastille column in the square was left scrawled with graffiti, including, Sarko 2007 = Hitler 1933.
Four policemen and one civilian were injured, the police said.
In Lyon, Frances second-largest city, the police used tear gas on anti-Sarkozy protesters in the main square. There were other isolated episodes of protest in cities and towns across the country, including Grenoble, Rennes, Nantes, Bordeaux, Toulouse, Metz and Marseille.
Nonetheless, there was no repetition of the orgy of unrest that gripped the countrys troubled multiracial and multiethnic suburbs in late 2005.
Meanwhile, Mr. Sarkozy celebrated. After his acceptance speech, he blew kisses to the crowd before heading toward a restaurant on the Avenue des Champs-Élysées.
Mr. Sarkozys wife, Cecilia, who has been notably absent during most of the campaign, was not with him throughout the day.
He was accompanied to his acceptance speech by his two sons from a first marriage and his two adult stepdaughters. Mrs. Sarkozy joined her husband at the restaurant and accompanied him to an outdoor victory party at the Place de la Concorde.
There, 30,000 supporters filled the square where revolutionaries once guillotined monarchists, chanting, Nicolas! Nicolas! Nicolas!
Mr. Sarkozy gave another upbeat speech. He clapped as Faudel, a French singer of Algerian origin, performed. Everyone sang the Marseillaise.
I am very happy because he is the only one who can save France, said Michele Mault, who is 50 years old and unemployed. Sarkozy gives hope to someone like me who has no job, and especially to my children.
The election was a triumph of raw ambition, efficiency and political sleight-of-hand. The French president is an odd invention part monarch and part elected politician. There is no other elected political office in Europe that comes with as much power and grandeur.
Throughout the campaign, Mr. Sarkozy had portrayed himself as an outsider, an immigrants son with a foreign-sounding name, a man who never went to one of Frances elite universities. He is also the quintessential political insider, however, a longtime figure in party politics and a member of the cabinet of President Jacques Chirac for much of the past five years. But he succeeded in making himself look like a political outsider, distancing himself from Mr. Chirac, who was seen by the French as old, tired and powerless in the twilight of his 12-year presidency.
Mr. Sarkozy ran an extraordinarily disciplined campaign with a single message: change, but not too much to scare voters.
Ms. Royals direct grass-roots appeal to the French people and her pledge to be their protector was revolutionary. But Ms. Royal, a former schools and environment minister, found herself in the odd position of being the candidate of her Socialist Party without enjoying the support of its elite.
Her campaign was fraught with mixed messages, defections and shifting strategies. She never seemed to convince voters that she had enough substance.
Twenty-two years younger than Mr. Chirac, Mr. Sarkozy also represents a generational change in French politics, in which World War II and the cold war are not determining factors.
Supporters of the centrist candidate, Mr. Bayrou, who came in third place in the first round with nearly seven million votes, split their vote almost evenly between Mr. Sarkozy, with 40 percent, and Ms. Royal, with 38 percent, according to Ipsos.
Mr. Sarkozy received 63 percent of the vote of those who supported far-right leader Jean-Marie Le Pen in the first round, according to Ipsos. Even though he had urged his supporters to abstain, only 20 percent did so; 15 percent voted for Ms. Royal, and 5 percent cast a blank or defaced vote.
In the most surprising development, 52 percent of female voters cast their ballots for Mr. Sarkozy, compared with 48 percent for Ms. Royal.
Mr. Sarkozy captured the vote of people 60 years and older; Ms. Royal fared well with very young voters the 18 to 24 year old age group, where she won 58 percent of the vote. But Mr. Sarkozy gained the upper hand in the next age group, those 25 to 34, where he received 57 percent of the vote.
Artisans and shopkeepers also chose Mr. Sarkozy with 82 percent of the vote. Farmers, who traditionally vote on the right, gave him 67 percent. Ms. Royal did better among blue-collar workers, with 54 percent of the vote. The data was taken from a poll carried out by phone on Sunday on a sample of 3,609 people, representative of French registered voters.
Mr. Sarkozy officially will assume office ten days from now, a few hours before Mr. Chiracs mandate ends. In a formal meeting, Mr. Chirac will hand over the secret codes for Frances nuclear weapons.
There will be a 21-gun salute; the Marseillaise will be played.
The President of the Constitutional Council will read the results of the election. The Grand Chancellor of the Legion of Honor will make Mr. Sarkozy Grand Master of the Order.
Ariane Bernard and Maia de la Baume contributed reporting.