Israel's Supreme Court has rejected an attempt to declare that the policy of targeted killings of Palestinian militants is illegal.
Israeli strikes target suspected militants but civilians are also killed
The court noted that not every killing complied with international law, but said the legality of operations should be assessed on a "case by case basis".
The ruling came in response to a petition from two human rights groups.
In recent years, Israeli operations have targeted many suspected militants and left dozens of civilians dead.
The practise of targeted killings dates back to the start of the Palestinian intifada in September 2000
The term is used by Israeli officials who argue that the tactic is a way of killing militants who are about to carry out an attack or are behind such attacks.
However, Israel has targeted political leaders, and civilians have often been killed in the attacks.
The tactic is seen by many human rights groups and by some members of the international community, including Britain and the European Union, as contrary to international law.
Key Palestinian figures, such as Hamas founder Sheikh Ahmed Yassin, have been killed in targeted killings.
The operations often involve air strikes, which use intelligence from agents on the ground to target houses or cars where suspects are believed to be.
The court rejected a total ban saying: "We cannot determine in advance that all targeted killings are contrary to international law."
"At the same time, it is not possible that all such liquidations are in line with international law. The legality of all targeted killings must be examined on a case by case basis."
According to human rights group B'Tselem, 339 Palestinians have died in targeted killings since September 2000, of whom 210 were suspected militants and 129 were bystanders.
The court said that caution was needed to prevent civilian casualties.
"Innocent civilians should not be targeted," it said. "Intelligence on the (targeted) person's identity must be carefully verified."
The court also allowed for the possibility of compensation claims from civilians.
The two human rights groups, the Public Committee Against Torture in Israel and the Palestinian Society for the Protection of Human Rights and the Environment, filed the suit in 2002 but a ruling has been repeatedly delayed.