A custodian and his three associates killed 20 people inside a small shrine in eastern Pakistan, an official said Sunday.
The incident took place in the Sargodha district of Punjab province late Saturday, when the custodian invited devotees inside the shrine he worked at.
The custodian and his companions then killed them with a dagger and large stick, Shamsher Khan from the Sargodha police told dpa.
"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 was continuing.
Punjab Chief Minister Shahbaz Sharif has asked for a police report on the investigation within 24 hours, a senior government official said.
Visiting the shrines and offering alms to the poor -- and cash to the custodians -- remains very popular in Pakistan, where many believe this will help get their prayers answered.
For centuries Pakistan was a land of Sufism, a mystical branch of Islam whose wandering holy men helped spread the religion throughout the Indian subcontinent in the 13th century.
Several million Muslims in Pakistan are still believed to follow Sufism.
Terrorist groups such as the Taliban or the Daesh have carried out major attacks on Sufi shrines.