The Israeli foreign minister Tzipi Livni declared victory today in the Kadima Party leadership race by a narrow margin of 431 votes.
The victory means she is in a position to try to form Israel's next government - which would make her the country's first female Prime Minister for 34 years.
Ms Livni, 50, will replace Prime Minister Ehud Olmert, who is stepping down to battle multiple corruption allegations.
The victory declaration came after official results showed Ms Livni taking the race by a far narrower victory than exit polls had predicted.
She barely edged out rival Shaul Mofaz, Israel's transportation minister and a former defence minister.
"The national responsibility (bestowed) by the public brings me to approach this job with great reverence," Ms Livni said, shortly after official results were announced.
Ms Livni will have 42 days to form a new ruling coalition. If she succeeds, she will become Israel's first female prime minister since Golda Meir stepped down in 1974. If she fails, the country will hold elections in early 2009, a year and a half ahead of schedule.
Mr Olmert, who is stepping down to battle multiple corruption allegations, will remain as a caretaker leader until parliament approves a new Cabinet.
Olmert spokesman Mark Regev said the prime minister called Ms Livni to congratulate her on her victory and would notify the Cabinet on Sunday that he would resign.
Israeli media reported today that Mr Mofaz also called Ms Livni to congratulate her on her victory, rejecting a legal adviser's proposal that he appeal against the poll results.
A fast-rising star in Israel's political firmament, Ms Livni is Israel's lead negotiator in peace talks with the Palestinians and a rare female power figure in a nation dominated by macho military men and a religious establishment with strict views on the role of women.
A lawyer and former agent in the Mossad spy agency, she is eager to continue the low-decibel diplomatic efforts. She says she hopes diplomatic efforts to halt Iran's nuclear programme will prevail, though she says all options are on the table.
With opposition leader Benjamin Netanyahu's hardline Likud Party polling well, neither Kadima nor its coalition partners appear eager for a new election.
But the ultra-Orthodox Shas Party, which could be key to building a new coalition, has already served notice that it would not join a government that is willing to negotiate the fate of disputed Jerusalem with the Palestinians.
As lead peace negotiator, Ms Livni is committed to discussing all the outstanding issues between Israel and the Palestinians, and the future of Jerusalem is at the heart of the conflict. Shas' position will require some deft political manoeuvring on Ms Livni's part if she is to sidestep elections.
Nationally, polls show Livni roughly tied with Netanyahu. A new nationwide vote would probably turn into a referendum on the current effort to forge a historic peace deal with the Palestinians.
"I am really happy that Livni won because she is committed to the peace process," said dovish Israeli MP Yossi Beilin. "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."
Palestinian information minister Riad Malki said he was hopeful that peace talks could succeed under Israel's new leadership.
"We welcome the results of the election, and we are going to deal with any new prime minister in Israel," he said. "We hope this new prime minister will be ready to ... reach a peace deal with the Palestinians that ends the occupation and allows the establishment of an independent Palestinian state living beside Israel."
The primary was Kadima's first since the party was founded by then-prime minister Ariel Sharon in 2005. Mr Sharon suffered a debilitating stroke in early 2006, and Mr Olmert subsequently led the party to victory in elections.
Mr Sharon set up Kadima as a personal bastion after his hardline colleagues in Likud blasted his unilateral pullout from the Gaza Strip in 2005. It was widely predicted Kadima would disintegrate after his exit, but the moderate Ms Livni's victory appeared to give it a chance of survival.
Israeli political science professor Gadi Wolfsfeld said Ms Livni could use a peace deal to win a national election.
"If she comes to a tentative agreement with the Palestinians, why not run on that platform, which would be very good for her?" he said.Reuse content