French Socialist MP Francois Hollande has been crowned favourite for next year's presidential election, winning the left's primary to choose a challenger for Nicolas Sarkozy.
The centre-right incumbent is expected to stand for re-election, but all recent opinion polls show him on course to lose to any left-wing challenger, and Hollande's victory will serve as a springboard for his campaign.
The vote was France's first US-style open primary - any voter who said he or she supports the ideals of the left could vote - and the huge turnout, estimated at 2.8 million, was hailed by Socialist leaders as a boost for the battle ahead.
"Tonight, we rally behind our candidate," Socialist leader Martine Aubry declared after conceding defeat, preparing to welcome her erstwhile opponent to Socialist Party headquarters to celebrate his victory and make a speech designed to reunite and motivate activists.
Segolene Royal, who is both Hollande's former partner and the Socialist's defeated candidate in the 2007 election, said the win was both an "undeniable advance" and showed supporters' "very strong trust" in the victor.
Hollande had the backing of the four defeated first-round candidates and entered the run-off as favourite, but Aubry mounted a tough fightback, branding him a soft centrist without the steel to defeat Sarkozy.
Aubry, 61, the former labour minister who gave France its 35-hour working week, also attacked Hollande's lack of executive experience.
But 57-year-old Hollande turned the attacks to his advantage, accusing Aubry of undermining party unity and suggesting his lack of a track record would make it easier for him to run as a candidate of change.
Sarkozy's camp was wrong-footed by the primary. Some of his supporters grudgingly admitted it served as a good shop window for the Socialists, but the president himself dismissed it as alien to French political tradition.
The majority UMP mocked the left's policy debate, portraying it as a throwback to the 1980s, but televised confrontations drew large audiences.
The right had hoped the primary format would sow discord between the six hopefuls, triggering the infighting for which the Socialist Party is infamous.
In fact, the first round remained relatively civil, despite a history of personal animosity between the frontrunners.
Aubry succeeded Hollande as Socialist Party general secretary and has since let it be known that she found the organisation in a sorry state.
Hollande was the partner of fourth-placed challenger Royal for 30 years, raising four children with her, but split from her secretly before her failed presidential and moved in with his girlfriend.
Despite the bad blood, the campaign only turned truly bitter in the closing straight, when Aubry attempted to close down Hollande's narrow but consistent lead by tacking to the left and branding him weak.
Historically, both she and Hollande come from the party centre ground.
In 1995, when France's last Socialist president Francois Mitterrand left office, they were both apostles of modernising former European Commission chairman Jacques Delors - Aubry is his daughter, Hollande his protege.
Even before the result was confirmed, Jean-Francois Cope, leader of Sarkozy's UMP, warned: "This evening we'll have an opponent, and we'll finally be able to demand some answers."
-AAP