Tzipi Livni, Israel's Foreign Minister, celebrated victory last night as exit polls showed the ruling Kadima party had decisively elected her as leader and propelled her to within reach of becoming the country's first woman prime minister for a generation.
Exit polls for all the main TV channels projected her as winning a first ballot victory of between 47 and 49 per cent of the vote in the first contested leadership race since the party was formed by her mentor Ariel Sharon at the end of 2005.
On a night when the outgoing Prime Minister Ehud Olmert telephoned her with congratulations and a promise of co-operation, Ms Livni was quoted as telling her supporters: "The good guys won." She added: "You fought like lions ... you did an amazing thing, and I just want to do all the things you fought for. Like me, you did it because you want this to be a better place."
But last night her opponent, the former army chief-of-staff Shaul Mofaz, had not yet conceded defeat amid unconfirmed reports that the voting could have been much closer than the wide margin of 10 per cent or more projected in the exit polls.
If confirmed, the result for Ms Livni, the most personally popular politician in Israel, could revive Kadima's electoral fortunes after they flagged in the wake of the corruption and fraud allegations which forced Mr Olmert to announce he was standing down as party leader and Prime Minister. The exit polls were greeted with jubilation by her supporters at her campaign's Tel Aviv headquarters.
Assuming that Ms Livni is able to assemble a workable coalition over the next month-and-a-half, Israel's government is likely to continue the negotiations instituted by Mr Olmert with the Palestinians' moderate Ramallah-based leadership on a future two-state solution to the conflict.
Ms Livni, a large part of whose electoral pitch was to project herself as the "Mrs clean" of Israeli politics, has been heavily embroiled in the talks with the negotiating team of Palestinian President Mahmoud Abbas – while cautioning against excessive expectations of the pace at which they can be concluded.
A victory over the hawkish Mr Mofaz will also belie fears that Kadima's 73,000 members might seek to revert to the familiar Israeli pattern of favouring generals in the premiership after the failures of Mr Olmert's handling of the 2006 Lebanon war. It subsequently emerged that Ms Livni had sought an early diplomatic solution to the war.
One determinant of the course of negotiations with the Palestinians could be whether she seeks a coalition to unite the centre and right – including the ultra-orthodox party Shas which opposes major concessions to the Palestinians – or whether she seeks a new left-wing, pro-negotiations partner like Meretz.
While warmly congratulating Ms Livni, the former Meretz leader Yossi Beilin became the first to try to push her in the latter direction, saying: "I am really happy that Livni won because she is committed to the peace process. I think the right thing for her to do now is to form a coalition that wants to promote peace rather than a broad government with the right."
She appears to have been boosted by a surge in voting after what she had said was a "disappointingly" low turnout earlier in the day. The final turnout – after Ms Livni secured an extra half hour in voting – was estimated at just over 50 per cent.
The polls show that she is the likeliest of the Kadima candidates to see off a powerful electoral challenge by Benjamin Netanyahu's right-wing Likud party.
Throughout the campaign Ms Livni and Mr Mofaz were well ahead in the contest for the votes of 73,000 party members over the two other candidates for the leadership, the cabinet minister Meir Shetreet and Avi Dichter former head of the domestic intelligence agency Shin Bet.
The exit polls also belied fears within the Livni campaign that Mr Mofaz might succeed by relying on the support of large collective groups of voters, including those from organised labour. At one of Jerusalem's two polling stations, in the city's Talpiot district, while many workers from the city's bus station appeared to favour Mr Mofaz, there was evidence of widespread individual support for Ms Livni.
Eli Kanyas, 61, who works on computers for one Israel's main TV channels, said: "She is a strong woman who can get the right security people around her if she needs them." A Kadima member from its formation in late 2005, he added: "I was ready to give Olmert a chance but look what happened. She's straight and she's not corrupt."
Russian-born Elizabeth Dorsky, said: "I voted Livni first because I am a feminist and secondly because Mofaz is Minister of Transport and transport is a mess. So what if he is a general? It's not the marks you have on your shoulder that counts but what you have in your head."
Yair Balkai, 63, a computer programmer, who said he had come to Kadima "from the left", added: "I want her to achieve peace. I want her to make Israel a better country to live in."
But a Mofaz supporter, Avi Yona, a driver for the bus company Egged, said "My son is a paratrooper and I was very impressed when Mofaz came to a parents day at his unit. If he had been in charge during the Lebanon war, it would have been better."
Yoni Binyamin, another Egged driver, denied that Mofaz supporters like himself were necessarily hawks. He said: "I am learning to play the oud with an Arab from Beit Safafa. I go to his house, we drink coffee. I believe Mofaz will make peace."
But Talel Hulakan 33, a bus driver of Ethiopian origin, hinted at support for Ms Livni by emphasising the need for "change in the party". He said he had voted in response to a call from a leader of the Ethiopian community.
Some commentators have been unimpressed by the candidates. Sima Kadmon, said in Yedhiot Ahronot that the contest was between "shades of grey" and added: "If you were to ask inhabitants of this country who they would prefer to pick up the red telephone at 3am [to deal with a major security threat against Israel], they would probably say neither."
What happens next?
Ms Livni cannot yet be certain of becoming Prime Minister. Her first task, assuming official results confirm the exit polls, will be to try to form a governing coalition that can stave off early elections in which the polls have long suggested Benjamin Netanyahu's right-wing Likud party would be a likely winner.
That period can last a maximum of 42 days. Technically, the Israeli President Shimon Peres has to accept the resignation of the present Cabinet and then consult other party leaders to invite Ms Livni to try to form a government.
But that is likely to be a formality. If, however, the coalition attempt fails, a general election must follow 90 days after that. Mr Olmert could stay in office as caretaker prime minister during that period. While Ms Livni has said she will not pay "any price" to potential coalition partners she would prefer to postpone elections until she has had a period as prime minister.
If a general election does take place, then the process of coalition building – all the more difficult because Israel's pure system of low-threshold proportional representation creates so many parties – begins all over again.