RoniSchutzer/Afp/Getty Images
On Wednesday, Mirta Szajnbrum holds a photo of her son who was killed in Lebanon war.

JERUSALEM — In a widely anticipated judgment, a formal inquiry released Wednesday found "grave failings" among Israel's political and military leaders in the 2006 Lebanon war, especially in their failure to decide what kind of war to fight.

But the inquiry was less scathing than many had expected in evaluating the performance and motivations of Prime Minister Ehud Olmert, and he seemed likely to keep his post.

The war against Hezbollah was "a serious missed opportunity," the inquiry concluded, in which "a semi-military organization of a few thousand men resisted, for a few weeks, the strongest army in the Middle East, which enjoyed full air superiority and size and technological advantages."

But the inquiry decided that the government's decision to launch a major ground invasion at the end of the war was "almost inevitable," despite the deaths it caused, and that Olmert acted in the interests of the state, not from partisan considerations.

This final report of the commission, released nine months after its harsh preliminary report and 17 months after the war, contained few surprises or revelations.

Olmert, who faced down demands last May that he resign, including from within his own Kadima Party, has again insisted that he will stay on. The final report, while castigating official decisionmaking and the command of the Israeli ground forces, is unlikely to spark the popular pressure that would be required to force Olmert to go.

The decision to stage a large ground operation as the U.N. Security Council was negotiating a cease-fire resolution has been the most controversial aspect of the war for Israelis. In the last days of the war, 33 Israeli soldiers died, a large number for this small country. Many have asked if they died in vain, sacrificed for a prime minister trying to salvage his reputation.

But the commission's judgments do not support that harsh view of Olmert's motivation, and that may be enough to keep him in office at least through the end of the year.

The key to Olmert's survival is Defense Minister Ehud Barak, who leads the Labor Party. Barak said months ago that he would pull Labor out of the government after the final report, but now says that he will do what is best for the country. Labor does not want new elections, which the Likud Party is likely to win.