The eldest son of the Pir walked into the room and greeted us in his melodious Seraiki accent. He was about 14 years old, younger than all my students. But in this place, power dynamics were not determined by age or similar social conventions. He was the son and heir of the Pir. If something were to happen to his father today he would become the next Pir, consequently the most important person in this region. Village elders would come to him with their problems, firm in the belief that this young man would be able to access divine help because of the family he was born into.

I myself was offended at the sight of this young boy walking in instead of his father. We were told that the Pir was resting at the moment and would emerge from his private quarters later in the evening. By then, the crowd of devotees slowly trickling into his courtyard would have increased manifold.

As Islamic militancy and orthodoxy has come to global attention, a certain glamour – or at least benevolence – has been bestowed upon Sufism, a syncretic version of Islam that grew on the Indian subcontinent and is associated with the institution of the Pirhood. Yet the link in parts of Pakistan between the practice of Sufism and feudalism’s great injustices remains unacknowledged. Most of the Pirs in this part of Pakistan are also the feudal lords of their area. Many have capitalised on the international sentiment against puritanical Islam and positioned themselves as a counterpoint to its growth, even promoting their business interests in this manner.

Whereas these cultural formations must be salvaged to counter the propaganda of the militants, one needs to be aware of their historical and political context. In certain regions, which include South Punjab and Seraiki belts of Mianwali, Bannu and Dera Ismail Khan, the emergence and the popularity of the puritanical version of Islam in recent years is in fact a reaction to the feudal nature of religion, closely tied with the Pir and darbar culture.

For a poor farmer, tied under the debt of the local Pir, the rhetoric of the puritanical propounds of Islam, with their anti-darbar idiom, comes across as revolutionary. In the new societal patterning that the farmer is presented with, the world is cast in Islamic and un-Islamic groups – and the first enemies of Islam are his feudal masters and their followers.

I was sitting in the village of Bilot Sharif, in the tumultuous region of Khyber-Pakhtunkhwa. Just a few kilometers from here is the city of Dera Ismail Khan, the hometown of Maulana Fazal-ur-Rehman, a prominent Pakistani politician with deep sympathies for the Taliban and one of their most vocal defenders in the Pakistani Parliament. On the other side of this village is the district of Bannu, a smuggling hub between Afghanistan and Pakistan, home to both smugglers and militants.

We were in the house of the Pir of the shrine of Haji Imaam Bukhari. I was accompanied by my wife Anam, my mentor Iqbal Qaiser and my photographer friend Rida Arif. We were on our way to the ancient Jain temples of Bilot, not far from here, but since we had been dragged into visiting the Pir, probably because our guide wanted to impress us, we decided to visit the shrine. The shrine developed around a saint who lived several centuries ago and according to local legend was one of the first Muslims in this region.

“You should also see the Hindu temple of Baba Lal,” said one of the caretakers at the shrine, when I told him that we were supposed to head up to the Jain temples from here. “There is an idol there and the temple is functional. You might even run into a few Hindus.”

We were standing in the graveyard of the Muslim shrine. Hundreds of devotees had paid large sums of money to the guardians of the shrine to be buried next to the saint, in land that is said to have turned holy due to his presence.

The temple was off the main road. We parked in front of an iron gate where a uniformed police officer stood. There were devotees standing at the gate, arguing with him, trying to get in. I told him I was a journalist here from Islamabad, visiting this temple for a story. “You can go inside but no photographs,” he said. This was a security precaution against the rising threat of Islamic militancy.

We walked across an open courtyard and entered the temple after taking our shoes off at the entrance. There was a giant peepal tree behind the temple. The temple itself was a concrete platform with a picture of a sadhu resting on it. There were a few female devotees sitting around it.

On our way back I stopped to talk to Ibrahim, who was cleaning the courtyard with a jhaadhu. “I am a Muslim,” he said. “I have been serving the temple for 40 years, ever since I was a child.” I could tell by the white in his beard that he was now in his fifties. “My father established this temple. He was a devotee of the shrine of Haji Imaam Bukhari. He was a dervish there. The Pir there told him that he should go and look after this Hindu temple here, which was destroyed during Partition.”

“When was this?” I asked him.

“During the Bhutto era. My father came and served this temple then. He cleaned the space and made sure that this holy space became sacred again.”

“Whose picture is that inside the temple?”

“That is Baba Lal. He was a knowledgeable sadhu, with both Hindu and Muslim devotees. When he died, his devotees began to debate whether he should be buried like a Muslim or be cremated like a Hindu, like Baba Guru Nanak. They left his body here and went to ask the Pir. But by the time they returned the body had already buried itself in the earth. The Hindus and Muslims then made this platform over the land where the saint was interred.”

I ask him if Muslims also come to the temple. “Yes,” he said. “Most of the devotees here are Muslims. It is only during the festival that Hindus from faraway regions come and stay for a few days. Some devotees come from India, the descendants of Hindus who left this place at the time of Partition. When they left they took some mud with them to India and there they built a temple dedicated to the saint, using the mud they took from here. This picture of the saint was given to us by these devotees from India.”

The story came as a revelation to me. I had considered this land to be a place of religious extremism and violence, yet it was here that we found this beautiful story of religious syncretism.

“You know, Baba Lal was actually a Muslim,” said Ibrahim. I was expecting a statement like this; it is the way belief works in a place with no appreciation of such syncretism, where in fact it is strongly opposed. “He whispered the Kalma into the ear of the Pir, but for the rest of the Hindus he remained a Hindu. The Pir assured him that on the day of judgment he would intercede for him and get him into heaven.”

“I heard a fascinating story,” said Anam as we were leaving the temple. “There was a woman sitting next to the temple. She was mentally challenged. She told me that her family put her here so that she recovers. It turns out she is also a Muslim.”

Haroon Khalid is the author of A White Trail: A journey into the heart of Pakistan’s religious minorities. (Westland Publishing, 2013)