The divided and demoralised French Socialist Party appeared on the brink of implosion yesterday after a bitterly fought contest to elect its first female leader descended into open warfare between rival political clans.

After a night of high drama, bitter recriminations and thinly veiled threats, Martine Aubry, the no-nonsense Mayor of Lille, emerged bloodied but triumphant from the election by a wafer-thin margin of 42 votes. Official results gave her 50.02 per cent of the vote and her rival, former presidential candidate Ségolène Royal, 49.98 per cent.

Immediately denouncing the figures as 'contested and questionable', Royal's team cried foul and vowed to use every available means to fight the result and hold a fresh vote. 'I am not going to take this,' the candidate told journalists early yesterday. Issuing a series of allegations of electoral manipulation, her entourage accused the opposing clan of 'stealing victory' through a campaign of dirty tricks. 'There was fraud, there was cheating,' said Royal's close ally, Manuel Valls. 'The results of last night are profoundly in doubt.'

Aubry, however, remained defiant, insisting there was no need for a second vote to be held despite the narrowness of her victory. The party old-timer claimed she had received the backing of outgoing leader François Hollande - Royal's former partner and father of her four children. Her advisers rejected all calls for a re-run, accusing the telegenic Royal of being a bad loser. 'No one can deny the situation is complicated, but no one can deny that Martine Aubry is the new first secretary of the Socialist Party (PS),' said François Lamy. 'Just because you don't like the result doesn't mean you can change the rules.'

If the chaos of election night was spectacular, both for its tight result and sheer political poison, it was nothing the Socialists were not prepared for after a leadership campaign mired in infighting and beset by personal rivalries. Friday night was the fitting culmination of a contest which had seen the party tear itself apart and fail to engage the public in its ideas after a dismal spell of barely audible opposition.

This fresh crisis, which has left the PS split in two, will make the job of secretary-general even less desirable than before. Analysts said such stark divisions between the rival camps would make a party desperately in need of strong leadership almost unleadable. For Royal, 55, who lost to Nicolas Sarkozy in last year's presidential election, failure to wrench control of the party's leadership from the 'elephants' who detest her will be a bitter pill - especially as she won both the first round of voting and a grass-roots poll of support for her programme of reforms.

Reiterating her call for a re-run of the vote, Royal said it was the party members' right to have a chance to express themselves through a poll whose result was clear and uncontested. Appearing on TF1 last night, she criticised the behaviour of Aubry, saying she had 'rushed' into claiming victory before the vote had been conclusively decided. '[It is] very strange to see a candidate proclaim herself the victor while the decision is still up in the air.' But she quashed any suggestion the debacle would prompt her to split from the PS. 'There is no question of my leaving the Socialist party,' she said.

Her devoted band of followers is unlikely to make life easy for her vanquisher. Pleading with both camps to find a way to reconcile their differences, Hollande yesterday reiterated his frustration at the candidates' inability to come together - a frustration made clear a week ago when he called off his traditional speech to party members in disgust at a disastrous congress in Reims. 'No one person is now in a position to be the sole leader of the Socialist Party,' he told French radio. 'This party can only be led if we unite.'

Aubry, 58, daughter of former European Commission president Jacques Delors, faces the daunting task of uniting disparate members and of putting back on track a party which has not won a presidential election since 1988.

Speaking at a press conference at the Assemblée Nationale last night, Aubry said that as soon as the result of the vote was 'validated' by party officials, she would focus her efforts on reuniting the PS and be 'a leader for all Socialists'. 'I understand the disappointment of Ségolène Royal and those who voted for her,' she said, but added: 'The question is no longer one of who lost or who won. We will all have lost if we are not capable of coming together very quickly.'

Faced with an outright war between two of its most prominent figures, the party leadership yesterday called an emergency meeting for Tuesday night at which it would pronounce officially on the outcome. A traditionalist social democrat who pioneered the 35-hour working week when working as Lionel Jospin's Employment Minister, Aubry has spoken of her desire to keep the party 'anchored on the left'. Her political loyalties and sober style have always been in stark contrast with Royal's more liberal instincts and glamorous image. Their clash in what the French media declared le duel des dames came to symbolise the opposing strands of thought in the PS.

In reality, although Friday night's results appeared to reveal a party of two halves, those opposing strands are many and various. But, as the contest came down to the two women, the TSS (Anyone but Ségolène) movement took hold and led to the two other candidates urging their voters to plump for Aubry. Bertrand Delanoë, the popular mayor of Paris whose surprise failure to garner popular support saw him drop out of the race, begged his supporters to vote 'massively' for the straight-talking Aubry. Benoît Hamon, the youthful challenger from the party's hard left, did the same.