Barak's decision, which had been expected, removed any immediate threat to the survival of Olmert's coalition as it pursues its declared goal of signing a peace treaty with the Palestinians this year. Barak had said before replacing the wartime defence minister, Amir Peretz, in June that he would push for Olmert's resignation or early elections after a war inquiry delivered its final report.
The report, delivered last Wednesday, left Olmert relatively unscathed, but criticized the government and the army for "serious failings and flaws."
"Why am I staying? I'm staying in the post of defence minister because I know what kind of challenges face Israel - Gaza, Hezbollah, Syria, Iran, the rehabilitation of the military and the political process," Barak said.
If Barak had pulled his Labour Party's 19-member faction out of the coalition, Olmert would have been stripped of his parliamentary majority and likely forced to move up elections, currently scheduled for November 2010. His coalition now controls 67 of parliament's 120 seats.
But with Labour trailing badly in public opinion polls, Barak apparently decided his party's political fortunes - and his own - would be better served by remaining in the government. Barak hopes to reclaim the premiership he lost in 2001 elections, but polls would hand the race to hawkish opposition leader Benjamin Netanyahu of the hardline Likud Party if balloting were held today.
A Netanyahu victory would bode poorly for U.S. President George W. Bush's goal of brokering a Mideast peace accord before leaving office next January.
Given the poll results, Barak's decision to remain in government had been expected, even at the cost of his credibility. "I know that I could pay a political price for this decision," he declared in announcing his plans before Israel's weekly Cabinet meeting.
Barak had broad Labour backing for his decision.
Olmert issued his first public pronouncement on the Lebanon war report at the start of that meeting, without addressing Barak's decision to remain in his government.
"This report is not a source of happiness," Olmert said. "It's the source of the possibility for an opportunity to correct things that were uncovered, to improve them and rebuild, if necessary, and lead Israel forward."
The war erupted on July 12, 2006, when Hezbollah guerrillas crossed into Israel, killed three Israeli soldiers and captured two others.
Olmert entered the conflict with enormous support from the Israeli public, but his popularity plunged after the month-long campaign failed to achieve his declared goals - winning the soldiers' release and crushing Hezbollah. The two soldiers have not been heard from.
Despite a heavy Israeli aerial campaign, Hezbollah bombarded northern Israel with nearly 4,000 rockets. Israeli reservists returning from the battlefield complained of poor training and a lack of ammunition and key supplies.
Between 1,035 and 1,191 Lebanese civilians and combatants were killed during the war, as were 119 Israeli soldiers and 40 civilians, according to official figures from both sides.