The custodian of a shrine in Sargodha and two accomplices have been arrested for intoxicating and murdering 20 devotees and injuring four others with batons and knives early Sunday, police said.
Four women were among those killed in the attack at the shrine to Mohammad Ali, according to police, who said they had arrested three suspects including the custodian.
The motive for the slaughter was unclear but some officials said the chief suspect had mental health problems and had used violence on followers before.
"The 50-year-old shrine custodian, Abdul Waheed, has confessed that he killed these people because he feared that they had come to kill him," regional police chief Zulfiqar Hameed told AFP.
"The suspect appears to be paranoid and psychotic, or it could be related to rivalry for the control of shrine," he said, adding that the investigation into the killings near the city of Sargodha was continuing.
Local police station chief Shamshir Joya said the victims, whose clothes were torn and bloodstained, appeared to have been given intoxicants.
"We suspect that the victims had been given some intoxicants before they were murdered, but we will wait for a forensics report to confirm this suspicion," he added.
Joya said the shrine was built in the area some two and a half years ago.
Sargodha Deputy Commissioner (DC) Liaquat Ali Chatta claimed that Waheed, believed to be a resident of Lahore, was a one-time employee of the Election Commission of Pakistan. He took over the shrine after its completion.
Local rescue service official Mazhar Shah said Waheed used to meet devotees once or twice a month and used violence to "heal" them.
"Local people say that Waheed used to beat the visitors who came to him for treatment of various physical or spiritual ailments," Shah told reporters in televised comments.
"Sometimes he would remove the clothes of his visitors and burn them."
The attack was reported by an injured woman who arrived at District Hospital Sargodha, DC Chatta said, adding that she was one of four survivors who managed to flee from the scene of the crime.
Television footage showed scattered shoes, clothes, sheets and cots in the yard of the white-painted domed shrine as police vehicles and police commandos surrounded the premises, sited amid green farmland.
Acting on the information, a heavy contingent of police rushed to the shrine and arrested Waheed and his alleged accomplices, he said.
Chatta said that the shrine custodian seemed "mentally unstable." He added that the custodian was allegedly in the practice of "beating and torturing" devotees to "cleanse" them.
Quoting the survivor, the deputy commissioner alleged that the custodian had contacted devotees via telephone and summoned them to his room one by one. He claimed that the custodian had offered an intoxicating substance to his victims before removing their clothes and stabbing and beating them to death.
Punjab Minister for Religious Affairs Zaeem Qadri said intelligence agencies along with police and the local government were investigating all aspects of the case.
Qadri said that his department managed some 552 shrines in the province, but this one was not a registered with it.
"Investigators will also look into how this shrine was allowed to be set up on private land," he said.
Punjab Chief Minister Shahbaz Sharif has asked for a police report on the investigation within 24 hours, a senior government official said.
There have been cases of people dying during exorcism ceremonies at some shrines across the country, but mass killings are rare.
The chief minister announced that Rs0.5 million (S$6,600) will be given in compensation to the families of those who were killed in the attack, whereas compensation of Rs0.2 million will be given to the injured.