A mob in northern Pakistan attacked a man accused of blasphemy during Friday Prayers and injured several police officers who stepped in to rescue him, police said.

It was the third blasphemy-related incident in Pakistan this month, after a student was beaten to death by a lynch mob and a faith healer was shot dead.

Security forces in the town of Chitral fired tear gas and live rounds on the mob after they attacked the local police headquarters and demanded that alleged blasphemer Rashid Ahmed be made available for mob "justice."

Witnesses say that Ahmed earlier had entered the local mosque asking to make an important announcement, then declared himself a messiah. Angry believers attacked Ahmed, who local police chief Akbar Ali Shah said appeared to be suffering from mental illness. He suffered a beating, but police said his injuries were not life-threatening.

Shah said he told the mob that "Ahmed will be examined medically and if he was found mentally fit then he will be tried under the blasphemy law, but the mob was not satisfied."

Shah said he had asked for army assistance to help control the mob.

Blasphemy is a hugely sensitive charge in conservative Muslim Pakistan, and can carry the death penalty. Even unproven allegations can provoke mob lynchings and violence.

At least 65 people have been murdered by vigilantes over blasphemy allegations since 1990.

The independent Human Rights Commission of Pakistan (HRCP) has urged that all those involved in the lynching be brought to justice.