There is a little corner of Jerusalem that is forever India. At least, it has been for more than 800 years and its current custodian has plans for his family to keep the Indian flag flying for generations to come.

Around the year 1200, little more than a decade after the armies of Saladin had forced the Crusaders out of the city, an Indian dervish walked into Jerusalem.

Hazrat Farid ud-Din Ganj Shakar (or Baba Farid, as he is better known) belonged to the Chisti order of Sufis, a mystical brotherhood that still flourishes today across India, Pakistan, and Afghanistan. Later accounts of his life said that he spent his days sweeping the stone floors around al-Aqsa mosque, or fasting in the silence of a cave inside the city walls.

No-one knows how long Baba Farid stayed in the city. But long after he had returned to the Punjab, where he eventually became head of the Chisti order, Indian Muslims passing through Jerusalem on their way to Mecca wanted to pray where he had prayed, to sleep where he had slept. Slowly, a shrine and pilgrim lodge, the Indian Hospice, formed around the memory of Baba Farid.

More than eight centuries later, that lodge still exists. And although it stands inside Jerusalem's walls - perhaps the most fiercely contested stretch of ground anywhere in the world - it is still in Indian hands.

The current head of the lodge, 86-year-old Muhammad Munir Ansari, grew up there in the years before World War Two, when Palestine seemed to end just outside the gate.

"All the residents were Indian. I felt as if I was living in India. Whenever we entered the Hospice - Indian state!" he says. "At that time people came by ship. They used to bring food, rice, even their salt. Salt! All from India. As soon as you entered the gate, the smell of Indian food, they were washing their clothes, hanging them here in the courtyard."

The war cut off the flow of pilgrims and brought an end to the colourful scenes of Munir's childhood.

Image copyright other Image caption Sheikh Muhammad Munir Ansari as a boy

The lodge became a leave camp for the Indian Fourth Infantry division, whose soldiers had only just left when the first Arab-Israeli war broke out in 1948. By the time Munir succeeded his father as Sheikh - head of the lodge - in 1952, the building was scarred by shelling and overrun with Palestinian refugees.

But worse was to come.

In 1967, as the Israeli army fought its way into Jerusalem during the Six Day War, the lodge was hit by rockets.

"The '67 war started on Monday 5 June. On the second day we found them at our entrance. By night, 50 or 60 soldiers inside the gate - Jordanians. They were in terrible condition, asking for water," he says.

"That was on Tuesday. On Wednesday morning we went out to find not a single soldier. They ran away, leaving their uniforms and even their weapons. That day the Israelis began to prepare for entering the Old City. So these weapons that had been abandoned, some local people took these guns and started shooting. And we paid the price."

As the Israelis bombarded the hospice, Sheikh Munir herded his family from room to room. The shells found them near the shrine of Baba Farid. The roof collapsed. Sheikh Munir, his hands and face badly burned, pulled the survivors from the rubble. His mother, his sister, and his two-year-old nephew were dead.

From a hospital in the Old City, Sheikh Munir brought his family back to the ruins. "We came home. Very sadly, I can say. Imagine how the situation was. Most of the rooms were damaged. My hands were burned, my eyes were closed, my hair was burned. It was a miserable situation."

Miserable or not, there was no question of abandoning the lodge. Its history went back too far - to the days when Saladin was still consolidating his hold on Jerusalem.

Baba Farid arrived in a city that had just returned to Muslim hands after almost a century of Christian rule. The Crusaders, ensconced along the Mediterranean coast, had not gone away, and Saladin understood that if the Muslims were to keep Jerusalem, they would need to match the Crusaders not only on the battlefield but in their zeal for the city.

The Sufis therefore served a useful purpose.

More on Sufism

Image copyright Getty Images

Sufis usually belong to Tariqas - or orders - each tracing its lineage back to the Prophet

Sufis attempt to balance the three dimensions of the religion - Islam (submission), Iman (faith) and Ihsan ("doing the beautiful")

Many Sufi orders practise zikr - the rhythmic repetition or chanting of the word "Allah", or of one of other 99 names of God, or of a phrase from the Quran - some also use music in their rituals, a practice that has often drawn criticism from more conservative Muslim theologians

In the early 13th Century, Baba Farid-ud-Din Ganj Shakar, a famous Sufi saint from the Punjab, performed a solitary 40-day fast in Jerusalem - this site became the Indian Hospice

In the 17th Century, there were more than 70 Sufi zawiyas - or spiritual retreat centres - in Jerusalem

Source: BBC Religion | The Islamic Texts Society | Daniel Silas Adamson

Since the early days of Islam, mystics had been drawn to Jerusalem from across the Muslim world. There were some strange characters among them. Barefoot drifters who wandered from town to town in search of enlightenment. Ascetics who wore rough woollen robes and slept in the desert. Ecstatics who wept and sang for the love of God.

The jurists and theologians who guarded the frontiers of Islamic orthodoxy had always thought that the Sufis, with their music, whirling and wild ideas, were a suspicious bunch.

But they had many followers and it's not hard to see why. Here was a tradition that spoke more of God's gentleness than of his severity, a dialect of Islam in which love sounded louder than prohibition or dogma.

Saladin had the rock beneath the golden dome washed with rosewater, re-consecrating Jerusalem for the Muslim faithful. He welcomed the Sufis with open arms and encouraged popular devotion to the city's shrines and sanctuaries.

This was the atmosphere in which the first Indian pilgrims gathered at Baba Farid's lodge, bringing with them instruments and melodies from the Punjab.

They may well have sung verses written by Baba Farid. He composed hundreds of poems, drawing on the playful, even erotic imagery that runs right through Sufi literature. Instead of using the scholarly languages of Arabic or Sanskrit, Baba Farid chose to write in his native Punjabi, which had never before been used for poetry. As well as laying the foundations of a Punjabi literature that has thrived ever since, these poems bind together the Sufi and Sikh traditions of India: dozens of Baba Farid's hymns found their way into the Guru Granth Sahib, a compilation of mystical verse that is the central scripture of Sikhism.

Over the next 300 or 400 years, Sufi groups from across the Islamic world joined the Indians in Jerusalem. Funds poured into the construction of schools and lodges that housed mystics from Morocco and the Crimea, Anatolia and Uzbekistan.

Image copyright other

When the great Ottoman traveller Evliya Celebi arrived in the 17th Century, he counted at least 70 different Sufi lodges within the walls. Jerusalem, he wrote, was the Mecca of the dervishes.

Many of those lodges were still active on the eve of World War One. Sheltered by the Ottoman Empire, shrines built by Saladin and described by Celebi had survived into the 20th Century.

But war and modernity disrupted age-old patterns of pilgrimage. Caravan routes were cut off. Borders were drawn across the map of the Middle East. Sufism itself began to look to some like an anachronism, a relic from the medieval world. One by one, the Sufi lodges closed their gates and fell into dilapidation, so when the Ottoman Empire finally collapsed in 1922, no-one would have predicted that the Indian Hospice was about to flourish once more.

Its revival was rooted in desperation.

Image copyright other Image caption Sheikh Hasan Nazir Ansari

Resentful of British colonial rule and alarmed by the influx of Jews from Europe, Jerusalem's Islamic authorities were casting around for friends and allies. It was natural to look east - not to the emirates and kingdoms of the Arabian Gulf, still impoverished backwaters, but to British India, which was home to millions of Muslims, some of them fabulously rich.

In 1923, Jerusalem's Grand Mufti, Haj Amin al-Husseini (whose search for support would eventually lead him into a murderous collaboration with both Hitler and Mussolini), sent a delegation to India seeking funds for the restoration of al-Aqsa mosque. There, they met the leaders of the Khilafat movement - Indian Muslims who were agitating against British rule and struggling to promote the idea of a pan-Islamic Caliphate. The Palestinians told their Indian hosts about the decaying lodge. Could they send somebody - an Indian Muslim - to take charge?

The man who arrived in 1924 was called Nazir Hasan Ansari. He came from Saharanpur in Uttar Pradesh, and over the next 27 years he worked not just to restore the lodge but to revive the idea of Jerusalem as holy ground for Indian Muslims.

When the leader of the Khilafat movement, Muhammed Ali, died in 1931, his body was brought to Palestine and buried inside al-Aqsa mosque. As Saladin had done centuries earlier, the Islamic authorities were encouraging an old and deeply felt devotion to Jerusalem's sacred sites, using that devotion to forestall a rival claim on the city - this time, the claim made by Zionists rather than Christians. In the 20th Century as in the 12th, faith and politics met at the Dome of the Rock.

Image copyright other

As Indian pilgrims returned to Jerusalem, the Hospice recovered much of its prestige and spirit.

In the 1920s and 30s Sheikh Nazir travelled back and forth to India, persuading its Muslim princes to pay for the rebuilding of the lodge. Among those who contributed was the Nizam of Hyderabad, who appeared on the cover of Time magazine in 1937 as the richest man in the world.

Sheikh Nazir's main legacy, through, was not in bricks and mortar but in flesh and blood. Not long after his arrival in Jerusalem he married a Palestinian woman, Mussarra, and in 1928 she gave birth to Munir.

Almost 40 years later, in the wake of the Six Day War bombardment, Sheikh Munir buried his mother in the Muslim cemetery near Saladin Street, in a city now under Israeli control. Grief was softened by the squabbling and laughter of his own five children, who all survived the attack. Sheikh Munir raised them in the Indian Hospice, rebuilding the bombed out rooms and planting the lemon trees that now blossom in the quiet sunlit courtyard.

The lodge today has a library, as well as a mosque and guest rooms for the few Indians who still visit.

In 2011 Sheikh Munir received the Pravasi Bharatiya Samman, an award given by India's President for exceptional service to the country.

Image copyright other Image caption Sheikh Munir Ansari with granddaughter Nimala

From the roof he flies an Indian flag, its saffron and green visible over a city that remains as volatile as ever. Sheikh Munir, though, is not easily intimidated. "I am not afraid. I am satisfied for the future, that we, the Ansari family, are serving. After me, my elder son, Nazer, should replace me as Sheikh of the zawiyya [lodge]."

I ask if Nazer, who works overseas, is interested in taking over. Sheikh Munir hesitates. From a frame on the wall, his father looks down silently. The old man raises his hands, palms up.

"It's not a question of interested."

India's former ambassador to Israel, Navtej Sarna, recently published a book on the Indian Hospice - Indians at Herod's Gate: A Jerusalem Tale

Subscribe to the BBC News Magazine's email newsletter to get articles sent to your inbox.