By Alasdair Sandford
BBC News, Paris
Segolene Royal has attracted hordes of supporters
France has taken a major step towards electing its first woman president.
At the same time Segolene Royal, in winning the Socialist nomination, has dealt a significant blow to the party's traditional left wing.
The campaign has drawn comparisons to US politics. The three televised debates may have been dull, but the off-screen mud-slinging would have been worthy of the American presidential election itself.
Internet users have devoured websites, such as one called the "dustbin of the primaries", to read the latest blogs rubbishing opposing candidates.
Segolene Royal drew whoops of laughter at her final rally in Paris this week by attacking the "male chauvinism" of her competitors.
Laurent Fabius had reacted to her presidential bid by asking: "Who's going to look after the children?"
Dominique Strauss-Kahn had commented on one of her TV performances with the words: "She would have done better to stay at home rather than read from her kitchen recipes."
For good measure, she recalled the same candidate's mockery of her brief when she was environment minister in the early 1990s. "Those are girl's topics," she was told.
Both her rivals deny making the comments. "I am not a chauvinist," insisted Mr Fabius.
"I never said anything of the kind," said Mr Strauss-Kahn, accusing her of making the allegations without the slightest proof.
Dominique Strauss-Kahn has rejected allegations of chauvinism
Perhaps Ms Royal needed to deflect attention from the row which engulfed her over the weekend.
In a video recorded back in January, but only released on the internet last week, she told a party meeting she wanted to create a "revolution" in education to tackle "school failure".
Teachers, she said, should spend longer hours on school premises, instead of often giving private lessons outside.
Such comments fit a pattern: she has openly taken on her party's traditionalists by calling for a shake-up of the system that determines which children go to which schools.
But her acknowledgement that she did not want to "shout from the rooftops" her ideas about teachers obviously backfired. The video has been watched by hundreds of thousands of web users.
Teachers, many of whom are Socialist party members, reacted angrily.
Opinion polls in the run-up to the ballot gave Ms Royal a significant, if reduced, lead over her two rivals.
But, as many people are now realising, the views of those who mattered were something of an unknown quantity. The surveys questioned party supporters, not the actual members who cast their votes.
The past few months have seen tens of thousands of people part with 20 euros (£13.50) to join.
Royal is promising a clean break with Socialist convention
Have they been inspired by Ms Royal's fresh approach, by her willingness to challenge old party formulas, by her glamour?
Or have they signed up to defend traditional socialism, alarmed at what they see as a betrayal of the left's core values?
Perhaps a clue can be gleaned from the hordes who have turned out all over the country whenever Ms Royal makes an appearance.
There is no doubt that she has dominated the campaign. Almost half the questions put to the candidates by readers of one newspaper were addressed to her.
Had she failed to win an outright majority in the first round, an alliance of her left-wing opponents might have posed a serious threat.
But wavering Socialist voters may have been given food for thought by a poll published in Le Figaro this week.
A survey of first-round voting intentions at the presidential election put Segolene Royal neck-and-neck with Nicolas Sarkozy.
It also suggested her two Socialist rivals would be soundly thrashed by the expected candidate from the right.