JERUSALEM, Wednesday, June 13 (AP) — Former Prime Minister Ehud Barak won the Labor Party primary over a relative political newcomer, party officials said early Wednesday.

The Labor Party’s director general, Eitan Cabel, said Mr. Barak had beaten Ami Ayalon, a former chief of the Shin Bet security agency, to lead the party after a majority of the votes were counted.

An analyst for Israel Radio, Hanan Crystal, said the final count was 34,960 for Mr. Barak and 31,100 for Mr. Ayalon. An official announcement was expected later Wednesday.

Mr. Barak had earlier called for Prime Minister Ehud Olmert to resign over last summer’s inconclusive war against Hezbollah in Lebanon. Mr. Barak has said that he will keep the Labor Party in the governing coalition with the Kadima Party of Mr. Olmert, though he has pledged to work for early elections.

At a victory gathering in Tel Aviv, Mr. Barak called for party unity and pledged to pursue a policy that “combines uncompromising security, protecting Israel’s solidarity and democracy, determined pursuit of real peace, reinforcement of the rule of law and healing Israeli society.”

Mr. Barak is expected to succeed the deposed party leader Amir Peretz as defense minister in Mr. Olmert’s cabinet. Mr. Peretz also was criticized for mishandling last summer’s war; he was eliminated in the race for the head of the party in the first round of voting two weeks ago.

Before the vote, Mr. Barak said he had the experience to save the flagging fortunes of the Labor Party, the junior partner in Israel’s ruling coalition. Mr. Ayalon countered that the party, which led the Israeli government for the first three decades of its existence but now has only 19 seats in the 120-seat legislature, needed to start over.

Mr. Barak, a former army chief, served as prime minister from 1999 until he was crushed by the hard-liner Ariel Sharon in a 2001 election. Mr. Barak, 65, disappeared from the scene after his political drubbing amid new violence with the Palestinians and his failure to secure a final peace deal.

Since then, Mr. Barak has reportedly earned millions advising businesses and lecturing in the United States while setting the stage for a political comeback. As defense minister, Mr. Barak could take advantage of the national stage to try to show that he is a better leader than Mr. Olmert, Foreign Minister Tzipi Livni and Benjamin Netanyahu of the hard-line Likud Party, three possible competitors for Israel’s top job.

Copyright 2007 The New York Times Company