JERUSALEM  An Israeli military court convicted two soldiers on Sunday of using a 9-year-old Palestinian boy as a human shield by forcing him to check bags for explosives in Israel’s 2008-9 Gaza war.

The court said that the two soldiers, both infantry sergeants, had taken part in an operation to seize an apartment building in Tel al-Hawa, a southern suburb of Gaza City, while under attack from Hamas fighters.

A summary of the court’s judgment provided by the military spokesman’s office said the two had rounded up civilians and come upon bags in a bathroom. They grabbed the child and ordered him to check the bags for booby traps.

“The boy, who feared for his fate and was pressured by the situation, wet his pants,” the judges said, pointedly noting that, “unlike the soldiers, the boy had no means of personal protection.”