ISLAMABAD, Pakistan — The men and women arrived late on Saturday at a Sufi shrine in a village in central Pakistan. Followers of a self-described mystic, the pilgrims were accustomed to rituals in which they received spiritual guidance and sometimes removed their clothes to be cleansed of their sins.

Instead, the Pakistani police said on Sunday, they were given an intoxicating drink and then beaten with batons and hacked with knives, leaving 20 of them dead and four others injured.

After the massacre, the police said they had arrested the shrine’s custodian, Abdul Waheed, 50. Mr. Waheed, the authorities said, admitted luring the devotees to the site about 12 miles from Sargodha in Punjab Province, and carrying out the killings with the help of at least two associates.