A Muslim cleric has been arrested in Pakistan on terror charges after a teenage boy he accused of blasphemy responded by sawing off his own hand.

Anwar Ali, 15, performed the act of self-amputation with a scythe after attending a religious gathering in his local mosque last Monday.

Shabir Ahmed challenged anyone who did not love the prophet Muhammad, the most revered figure in Islam, to raise their hand. The boy misunderstood the question and put his hand up, prompting a chorus of shouts from those attending the Milad, a traditional event where songs and poems praising Muhammad are performed.

Ahmed, the cleric at the mosque in the small Punjab town of Hujra Shah Muqeem, reportedly denounced the boy as a “blasphemer who was liable to be killed”.

Nausher Ahmed, a police officer, said an emotional Ali rushed home and returned with his severed hand on a plate, which he presented to the mullah.

The police registered a case against the cleric on Friday, five days after the incident, after coverage of the case in local newspapers. Police said they had been unable to take immediate action as no one had lodged a complaint.

However a town resident Sajid Ali said the mullah had been arrested and was later released after pressure from other clerics. He said the boy had been given only rudimentary medical care at a clinic where his wound was bandaged.

Sajid Ali said: “The mullah has no right to exploit the emotions of Muslims and test their love for the prophet. The environment at the Milad put him under such deep pressure that he was forced to take this step.”

The boy, said he had no regrets. “What I did was in love for prophet Muhammad,” he said. His father, Muhammad Ghafoor, said he was proud of his son.

The cleric was arrested under counter-terrorism legislation designed to prevent incitement to violence. Disrespect for Islam is an extremely sensitive issue in Pakistan where people who have killed to protect the honour of the religion are folk heroes.

Blasphemy is a capital offence under laws that are routinely condemned by human rights groups who say false accusations are often levelled against religious minorities or by people embroiled in personal disputes.