Israel's Supreme Court has rejected a legal challenge to the military's rules on when soldiers can fire their weapons amid weeks of violent protests that have killed dozens of Palestinians on the border with Gaza.

Human rights groups had asked the court to declare as unlawful any regulations that allow soldiers to shoot at unarmed civilians, but the court sided with the Israeli military Thursday.

It said the protests are taking place in the context of a long-running armed conflict with the Islamic militant group Hamas that rules Gaza and thus weapons-use regulations are subject to the rules of armed conflict. Such rules allow greater leeway in the use of lethal force than those governing law enforcement practices.

Israeli gunfire has killed more than 100 Palestinians during the recent protests.