The move reflected growing concerns by Israel that officers could be subject to international prosecution, despite the army's claims that Hamas militants caused the civilian casualties by staging attacks from residential areas.
"The state of Israel will fully back those who acted on its behalf," Prime Minister Ehud Olmert said. "The soldiers and commanders who were sent on missions in Gaza must know that they are safe from various tribunals."
Speaking at the weekly Cabinet meeting, Olmert said Israel's justice minister would lead a team of senior officials to coordinate the legal defense of anyone involved in the offensive.
"That decision is not going to prevent all these organizations and countries to pursue their efforts through legal means," Palestinian Foreign Minister Riad Malki said at talks with European Union foreign ministers in Brussels. "So there is no immunity even if the decision was taken by the Israeli government."
Malki is a member of moderate Palestinian President Mahmoud Abbas' government, whose authority extends only to the West Bank after rival Hamas violently took over Gaza in 2007.
Israel launched its 22-day offensive to try to halt Hamas rocket fire on southern Israel. The assault killed 1,285 Palestinians, more than half of them civilians, the Palestinian Center for Human Rights counted. Thirteen Israelis, including three civilians, were also killed.
In related developments:
In addition to the civilian death toll, Israel has faced international criticism for its use of white phosphorous, and for shelling attacks that struck United Nations schools and installations that were serving as shelters.
Although the use of phosphorous weapons to light up the night or to create smoke screens masking troops is permitted by international law, Amnesty International has accused Israel of committing a war crime by firing the munitions in densely populated areas.
Israeli, Palestinian and international human rights groups have said they are seeking to build a case that Israel violated the laws of war. The groups are focusing on suspicions that Israel used disproportionate force and failed to protect civilians. They also have criticized Hamas for using civilians as human shields and firing rockets at civilian targets in Israel.
Israeli officials have said they took great efforts to avoid civilian casualties, and accused Hamas of deliberately using mosques, schools and residential neighborhoods for cover. Olmert angrily accused the "international legal arena" of "moral acrobatics" by ignoring years of Palestinian rocket salvos aimed at Israeli civilians.
"The state of Israel did everything in order to avoid hitting civilians. I do not know of any military that is more moral, fair and sensitive to civilians' lives," Olmert said.
In another precaution, Israel's military censor already has barred publication of the names or pictures of battlefield officers from the offensive.
Israeli leaders have faced similar concerns in the past. In 2001, then-Prime Minister Ariel Sharon was sued in Belgium over his alleged role in a 1982 massacre in Lebanon's Sabra and Shatila refugee camps. He was never convicted.
In 2005, a London court issued an arrest warrant for a retired Israeli general for his role in the bulldozing of houses in a Gaza refugee camp. The general ducked arrest by staying on his plane at London's Heathrow airport and flying back to Israel. Another top official, Cabinet Minister Avi Dichter, turned down an invitation to Britain out of concern that he could be arrested for his role in the 2002 assassination of a senior Hamas militant in Gaza.
The Israeli offensive ended with a temporary cease-fire last week, and international mediators are trying to work out a longer-term arrangement.