The Israeli Cabinet today approved the death penalty for terrorists convicted of acts of "inhuman cruetly" after a lively national debate based mostly on practical considerations rather than the morality of capital punishment.

The Cabinet's decision-by a one vote majority-instructs military and civilian courts to seek dealth by firing squad for terrorist attacks such as last Sunday's Palestinian raid on the costal town of Nahariya, which left four reasons dead. It reflects concern here over the growing number of Palestinian guerrilla raids on the civilian population since Egypt and Israel signed their peace treaty.

Opposition to the decision, cut across ideological lines in the Cabinet and in the Knesset, or parliament, which does not have to approve it because capital punishment is authorized by statues inherited from British mandate law.

Rightist Agriculture Minister Ariel Sharon is said to have opposed the dealth penalty in the belief it will obstruct government efforts to obtain cooperation from Palestinians in the West Bank and Gaza Strip. But at the same time, he urged that Israel step up its campagin against terrorism.

Much of the opposition to capital punishment oviced since Prime Minister Menachem Begin proposed its use last Tuesday has been base on what practical effect it would have on the actions of terrorists cornered by Israeli security forces.

Gideon Hausner, whoprosecuted Nazi war criminal Adolph Eichmann and demanded his execution in 1961, said he is against vengeance killing.

"I'm against the death penalty in order to make people feel better to give vent to feelings of revenge," Hausner said.

But, he said, the threat of capital punishment could be useful when it "would lead directly to the successful combating of terrorism." He proposed holding convicted terrorists under a sentence of death, and then using a stay of execution as a deterrent to other terrorists.

"I would consider the possibility of sentencing people to death, keeping them alive [and] not executing the sentence, but then in some extreme cases, executing those sentenses if heir comrades-in-arms and fellow murderers commit a crime either to obtain the release of those sentenced to death, or commit a crime that is genocide," Hausner said.

Shlomo Hillel, a Knesset member and former minister of police, pointed out that the 1974 terrorist attack on a Maalot school, in which 20 children were killed, and the 1975 raid on Tel Aviv's Savoy Hotel, in which 18 civilians died, demonstrated that when terrorists realize they are doomed, they kill hostages wantonly because of a feelong they have nothing to lose.

"We should make it clear, probably with a loudspeaker, that if you are going to kill hostages, then you are liable to die yourself. But if you refrain from harming hostages, then you have a fair chance of saving your own life." Hillel said.

Critics of this approach point out that many attacks involve "suicide squads" of guerrillas committed not to return alive. One of the Nahariya attackers wore a belt of explosives, but he was killed by gunfire before he could discharge it.

Government supporters of the death penalty argued that executing terrorists will reduce the motive of guerrilla squads that seize hostages and then demand the release of their imprisoned comrades, since there will be fewer imprisoned comrades.

A major argument against the death penalth has been that it will make martyrs out of convicted terrorists and subject Israel to intense international pressure.

The Jerusalem Post, in an editorial opposing capital punishment, observed that in any case terrorist squads rarely survive gunbattles once they are confronted by israeli Army forces.

"In view of the fact that our security forces have been successful in killing most of these murdereds in armed confrontations in the field, it would seem best to permit th e situation that has been in force for the past decade and more to remain inpractice," the newspaper declared.

It was not clear tonight whether the Cabinet decision will apply to the two Palestinian guerrillas captured during the Nahariya attack, or to the two still awaiting trial for last year's massacte on the Tel Aviv costal road in which 31 persons were killed.

However, Justice Minister Shmuel Tamir said later that in his opinion, the death penalty should not be applied to terrorists in prison now, because that would constitute "an element of retroactivity."

Begin did not disclose the Caabinet breakdown in today's vote, but government sources said that among those opposing the measure were Sharon and Defense Minister Ezer Weizman, who has supported a flexible policy in Israeli-Arab relations.

The other minister opposing it were Education Minister Zevulum Hammer, Labor Minister Israel Katz and Religious Affairs Minister Aharon Abu-Hatzeira. Housing Minister David Levy abstained, the Sources said.

Since its founding 31 years ago, Israel has had the capital punishment law left over from British mandate rule. But the only person executed here was Eichmann, architect of Nazi Germany's mass murder of European Jews. He was hanged in 1961 on the basis of a special law dealing with war criminals.

The Cabinet's decision today rescinded a decision in 1967 by the former Labor Party government to instruct military and civilian courts not to seek the death penalty.