JERUSALEM — Both front-runners for the leadership of Israel's ruling party vow to take a hard line against Iran, threatening possible military force if sanctions do not halt what Israel believes is a covert nuclear weapons program.

The winner of Wednesday's primary to replace Ehud Olmert as head of the Kadima Party would be in a strong position to succeed him as prime minister, and the stance toward Iran could have repercussions for peace in the Middle East.

Israel's soft-spoken foreign minister, Tzipi Livni, is battling Shaul Mofaz, a former military chief and defense minister, in the race to head the centrist party. Both say they prefer a diplomatic solution, but promise to be as tough as needed in confronting Iran.

Israeli officials describe Iran as the biggest threat to Israel's existence. They cite Iranian President Mahmoud Ahmadinejad's frequent calls for its destruction and the Iranian development of long-range missiles capable of striking the Jewish state.

Mofaz has indicated a stronger willingness to turn to the military option. In June, he spooked world oil markets by telling the newspaper Yediot Ahronot that Israel would have "no choice" but to attack Iran if diplomatic efforts to end Tehran's nuclear program fail.

"If Iran continues its nuclear arms program — we will attack it," he was quoted as saying.

Tones down languageAfter coming under heavy criticism for his comments, Mofaz toned down his language, but he hasn't ruled out a military strike.

"I never said that military action is the preferred choice," he told Yediot Ahronot last week. "It would be a last resort in the event that other options fail."

Livni, Israel's top diplomat for the past two years, has repeatedly said she hopes diplomacy prevails. But she too has said force cannot be ruled out if Iran fails to yield to sanctions.

"Iran needs to understand the military threat exists and is not being taken off the table," she said in June.

On the campaign trail, Livni, who was an agent with the Mossad spy agency before working as a lawyer, has declined to discuss her Iran strategy.

"I'm ready," she said last week. "The only thing I won't do is say in advance what I would do. Headlines on this issue hurt more than help."

Mofaz's supporters have sought to present Livni as lacking the security credentials to stand up to Israel's enemies, but she says people should not mistake her preference for diplomatic solutions for a lack of resolve.

"The fact that I'm a woman doesn't make me a weak leader," she said in an interview published Friday in the Jerusalem Post.

"I would like to think that generals also think twice when they make decisions, just like I do," she added. "It's not that generals pull the trigger and women don't. I have no problem pulling the trigger when necessary."

Capacity to produce a bombWhile Iran says its nuclear program is for the peaceful production of electricity, the U.N. Security Council has imposed three rounds of sanctions over Tehran's refusal to cooperate with an international probe of the program. Israeli officials believe Iran could have the capacity to produce a bomb as soon as next year.

Israeli policymakers and experts long have debated whether it would even be possible for Israel to take out Iran's nuclear program.

Such a mission would be far more complicated than the 1981 Israeli air raid that destroyed Iraq's partially built Osirak nuclear reactor or an Israeli raid last year on what U.S. intelligence officials described as an unfinished nuclear facility in Syria.

Iran's government has atomic installations throughout the country, some underground or bored into mountains, while the Iraqi and Syrian installations were single, aboveground complexes.

Also, there are signs Washington may be moving away from a military option, including a proposal to open a low-level U.S. diplomatic office in Tehran and a recent decision to allow a senior American diplomat to participate alongside Iran in international talks in Geneva.

Talk to Iran, experts sayOn Monday, five former U.S. secretaries of state, gathering to give their best advice to the next president, agreed the United States should talk to Iran.

The wide-ranging, 90-minute session in a packed auditorium at George Washington University produced exceptional unity among the former officials from both parties — Madeleine Albright, Colin Powell, Warren Christopher, Henry A. Kissinger and James A. Baker III.

"The military options are very poor," Christopher said. "And we have to tell the Israelis that."

Kadima called the primary after Olmert announced plans to step down, forced from office by a corruption scandal. Whoever wins will try to maintain the current governing coalition but, if that fails, will lead Kadima in a general election in early 2009 — a year and a half ahead of schedule.

Opinion polls made Livni and Mofaz the front-runners in Wednesday's race, well ahead of Avi Dichter, a former director of the Shin Bet security service, and longtime Cabinet minister Meir Sheetrit.

To win, a candidate must get at least 40 percent of the votes. Otherwise, a runoff would be held the following week between the two top vote-getters.

Copyright 2008 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.