MOGADISHU, Somalia - Six masked men used machetes to carry out amputations on three men accused of robbery by a Somali Islamist court, a witness said Saturday.

Abdulahi Hassan Afrah said the masked men chopped off a hand and a foot from two of the accused, and a foot from the third man after the Islamic court in the southern port city of Kismayo realized he was already disabled. Afrah said a crowd of about 400 people, mainly women and children, watched the sentence carried out Friday on the three screaming young men.

"It was most painful thing I have ever seen," he said.

A spokesmen for the al-Shabab militia, Sheik Hassan Yaqub Ali, said the three had admitted robbing passengers aboard a truck heading to Kismayo.

None of the three was allowed to appeal the sentence or had access to a lawyer.

The Islamic courts were originally set up to try to counter the bloody chaos of Somalia's 18-year-old civil war. Initially their harsh judgments were welcomed by many of the war-weary population, and in 2006 the courts formed the basis for an Islamist administration that controlled much of the capital and southern Somalia.

Last year, the courts in Kismayo ordered a 13-year-old gang-rape victim to be stoned to death. But amputations and public floggings are more common.