DENPASAR, Indonesia — An Indonesian man who survived a deadly mob attack by Muslim hard-liners was sentenced Monday to six months in prison, prompting outrage from rights groups over a sentence harsher than those received by some of his assailants.

Deden Sudjana, a member of Ahmadiyya, a minority Muslim sect that many conservative Muslims consider heretical, was found guilty by a district court in Banten Province on charges stemming from the attack in February. Judges said that he had refused police orders to leave the scene and that he had wounded one of the attackers.

The judges rejected a charge of incitement leveled by prosecutors, who had sought a sentence of nine months.

The clash, in the remote district of Cikeusik, caused outrage after a graphic video of it surfaced online. It showed the police offering little resistance as more than 1,000 villagers descended on a home where 21 Ahmadis were staying, killing three of them and then beating and stomping on their mud-covered bodies.