Israeli Foreign Minister Tzipi Livni won a narrow victory Thursday for the Kadima Party's leadership, positioning herself to become the country's first female leader in more than three decades.

Livni beat former defence minister and military chief Shaul Mofaz by a margin of 431 votes.

The 50-year-old will replace Prime Minister Ehud Olmert, the focus of a corruption probe, as head of Kadima.

She now has 42 days to form a new ruling coalition. If successful, Livni will become the country's prime minister -- the first female to hold the position since Golda Meir stepped down in 1974.

"All the people who came to vote today expressed what they wish to happen in this country," Livni said in her victory speech Thursday. "The national responsibility (bestowed) by the public brings me to approach this job with great reverence."

If she is unable to form a coalition, Israel will hold elections in early 2009 -- a year-and-a-half ahead of schedule.

"Trying to foster political relationships between rival factions is no easy task here," CTV's Janis Mackey Frayer reported Thursday from Jerusalem.

"She's going to have to cut a number of deals among these factions in order to get this coalition together."

In the meantime, Olmert will stay on as a caretaker leader until a new coalition is approved by parliament.

Livni has served as foreign minister since 2006 and has worked as Israel's lead negotiator in peace talks with the Palestinians.

"It's widely regarded as being possible that Livni, if she does become prime minister, could push ahead with the Palestinians towards the creation of a Palestinian state," said Frayer.

However, if a general election is triggered, current polls show Livni is roughly tied in popularity with the Likud Party's Benjamin Netanyahu.

If Netanyahu were to become prime minister, negotiations would likely stall, said Frayer.

Olmert is currently under investigation over his financial dealings with a U.S. businessman. Another case against him involves alleged violations in funding trips abroad.

With files from The Associated Press