With premeditation and without advance warning, US special forces deliberately killed an unarmed, elderly man sitting in the bedroom of his home in a small town in Pakistan. Since it was carried out without trial or legal process, some legal experts are questioning the legality of the killing of Osama bin Laden.RELATED:Osama, Obama and Israel's dramaInternational law makes a clear distinction between use of deadly force by a state in times of armed conflict and use of such force in peacetime. In times of armed conflict it is legal to deliberately kill enemy combatants. There is no obligation to warn enemy combatants or to arrest them first. The fact that an ambush on an unsuspecting enemy is legal illustrates this rule. Likewise, attacking an enemy camp at night while its soldiers may be sleeping is also legal. So too, killing an enemy sentry while his back is turned is permitted. One does not have to warn enemy combatants of an impending attack. The only reservation is when an enemy combatant surrenders. In such in a case, he is no longer a legitimate target. The American legal position is that it is in a state of armed conflict with al Qaida - a non-state armed group that is carrying out armed attacks against the US. The Israeli government and High Court have adopted a similar position with regards to terrorist groups. Bin Laden was the commander of al Qaida and as such was a legitimate target in a time of armed conflict. Whether or not, at the precise time of attack, armed commanders are carrying arms is irrelevant.However, a state's discretion to use deadly force against a dangerous individual is far more restricted when there is no armed conflict or the targeted persons are not combatants. In such a situation, targeted killing is permissible only when the terrorist’s activity poses an imminent threat and when there is no other viable alternative to the use of deadly force. In 1988, British SAS commandos in Gibraltar killed IRA agents that were planning to plant a bomb. The European Court of Human Rights ruled that the killing was legal only if there was no reasonable opportunity to arrest the agents and bring them to trial. A targeted killing of a terrorist leader would not be legal if, for instance, the terrorist was found in a country with an effective police force willing and able to arrest the suspect. In countries where the local authorities are either unable or unwilling to take prompt police action, deadly force is permissible. This was the case in Pakistan and was true also for Israel, when it carried out attacks against terrorist leaders in Gaza. The killing of bin Laden was thus legal under both the laws of armed conflict and the peacetime rules of national self-defense. Although it may not appear as a rule of law, critics of the operation should also take into account the amount of deaths that will have been prevented by eliminating this arch-terrorist.The writer teaches international law at the Hebrew University and is the former legal adviser to the Israel Foreign Ministry.