Sufi places of worship and retreat may be built near the graves of famous Sufi saints; they are often called khanqahs or tekkes. Ziyarat" comes from Arabic: زور "to visit". Iranian and south-Asian Muslims use the word ziyarat for both the Hajj pilgrimage to Mecca as well as for pilgrimages to other sites such as visiting a holy place. In Indonesia the term is ziarah for visiting holy places or graves.
Majority of Sunni scholars declare that the purpose of visiting the graves, cemeteries and tombs is only to remind people of death, and the dead that are buried there while supplications are made only to Allah. They point out to the Sunni historical sources proving that ziyarat is allowed and was always practiced:
"Whenever he would go to Baghdad, Imam Al-Shafi‘i would pay a visit to the grave of Abū Ḥanīfa. He would stand beside his grave, offer salutation to him and seek his intermediation for the fulfillment of his needs. Ahmad ibn Hanbal did the same practice with respect to his master (Imam ash-Shafi'i) to such an extent that his son would get astonished. Ahmad ibn Hanbal explained to his son that there is nothing wrong in seeking the intermediation of Imam ash-Shafi'i for the removal of difficulties because he, like the sun, was beneficial to the people." (‘Allamah Amini, Al-Ghadir, "Bab Fada'il wa Manaqib Abu Hanifah" (“Virtues and Merits of Abu Hanifah”), vol. 5, p. 194.).
It was narrated from Katheer ibn Zayd al-Madani that al-Muttalib said: "When Uthman bin Maz'oon died, his bier was brought out and he was buried, then the Prophet (peace and blessings of Allah be upon him) ordered a man to bring a rock but he was not able to carry it. So the Messenger of Allah (peace and blessings of Allah be upon him) stood up and rolled up his sleeves. Katheer said: al-Muttalib said: the one who narrated that to me from the Messenger of Allah (peace and blessings of Allah be upon him) said: it is as if I can see the whiteness of the arms of the Messenger of Allah (peace and blessings of Allah be upon him) when he rolled up his sleeves. Then he carried it and placed it at the head (of the grave), and said, “From this I will recognize the grave of my brother, and I can bury those among my family who die near him.” (Narrated by Abu Dawood, 3206. The isnaad of this hadeeth was classed as hasan by al-Haafiz ibn Hajar in al-Talkhees al-Habeer, 2/133.)
Al-Daraqutni reported in his Sunan (2/278) with an isnaad from Haatib that the Messenger of Allah (peace and blessings of Allah be upon him) said: “Whoever visits me after I die, it is as if he visited me when I was still alive."
There are many reasons for which the Shī‘ah partake in the performance of Ziyarah, none of which include the worship of the people buried within the tombs - Ayatullah Borujerdi and Ayatullah Khomeini have both said
"It is haram (forbidden) to prostrate to anyone except Allah. If the act of prostration in front of the shrines of the Infallible Imams ('a.s.) is a form of thanksgiving to God, there is no objection, otherwise it is haram."
The Shī‘ah do however perform Ziyarah, believing that the entombed figures bear great status in the eyes of God, and seek to have their prayers answered through these people (a form of Tawassul) - Sayyid Muhammad Hasan Musawi writes
"They (the holy figures) are being requested to supplicate to Allah, to deliver the person in need from his affliction, since the supplication of these saintly figures is accepted by Allah."
"God has some areas where he likes to be supplicated in, and the prayer of the supplicator is accepted (in those areas); the sanctuary of Husayn (a.s.) is one of these."
The Ziyarah of the Imāms is also done by the Shī‘ah, not only as a means of greeting and saluting their masters who lived long before they were born, but also as a means of seeking nearness to God and more of His blessings (barakah).
Carrying corpses to the Holy Shrines, Persia, 19th century.
The Shī‘ah do not consider the narrations in Bukhari to be authentic, and argue that if things such as Ziyarah and Tawassul were innovations and shirk, Muhammad himself would have prohibited people as a precaution, from visiting graves, or seeking blessings through kissing the sacred black stone at the Ka‘bah. Some Sunni scholars such as Ibn Taymiyyah, have also rejected the notion that such things are innovations (bid‘ah).
It is popular Shi'i belief that to be buried near the burial place of the Imams is beneficial. In Shi'i sacred texts it is stated that the time between death and resurrection (barzakh, purgatory) should be spent near the Imams.
^Majmu'ah Fatawa Ibn Taymiyyah, vol.1, p.106, as cited in al-Mausu'ah al-Fiqhiyyah al-Kuwaitiyyah, vol.14, pp.163-164. Ibn Taymiyya states: "Those who accuse a person of heresy for making tawassul deserve the most severe punishment."