The Short Answer

Yes. Visiting graves is not only permissible — the Prophet ﷺ explicitly commanded it after an initial temporary prohibition. He himself visited the graveyard of al-Baqi' regularly, taught specific supplications for grave visits, and wept at his mother's grave. The scholarly consensus on the permissibility of grave visitation is established and undisputed.

The Prophetic Command

كُنْتُ نَهَيْتُكُمْ عَنْ زِيَارَةِ الْقُبُورِ فَزُورُوهَا فَإِنَّهَا تُذَكِّرُكُمُ الْآخِرَةَ

I had forbidden you from visiting graves, but now visit them, for they remind you of the Hereafter.

Burayda (رضي الله عنه)Sahih Muslim, no. 977

This hadith contains a clear abrogation: the Prophet ﷺ initially prohibited grave visitation, then lifted the prohibition and commanded it. The reason he gave — "they remind you of the Hereafter" — shows grave visitation is not merely tolerated but purposeful: it softens the heart and creates awareness of death.

Why the Initial Prohibition?

The early Muslims had recently left pre-Islamic Arab practices that included worshipping ancestors at their graves, wailing excessively, and treating graves as sites of idol veneration. The initial prohibition was to sever these associations. Once the principles of tawhid (monotheism) were firmly established in the Muslim community, the Prophet ﷺ lifted the restriction, knowing the danger had passed.

This is a standard principle in Islamic law: temporary prohibitions tied to specific circumstances that are later lifted when the reason ('illa) no longer applies.

The Prophet's ﷺ Own Practice

He Visited al-Baqi' Regularly

كَانَ رَسُولُ اللهِ ﷺ كُلَّمَا كَانَ لَيْلَتُهَا مِنْ رَسُولِ اللهِ ﷺ يَخْرُجُ مِنْ آخِرِ اللَّيْلِ إِلَى الْبَقِيعِ

Whenever it was Aisha's night with the Messenger of Allah ﷺ, he would go out at the end of the night to al-Baqi' [the graveyard of Medina].

Aisha (رضي الله عنها)Sahih Muslim, no. 974

The hadith continues with the supplication he taught: "Peace be upon you, O dwellers of this abode from among the believers and Muslims. May Allah have mercy on those who have gone ahead of us and those who will follow. We shall, if Allah wills, join you."

This shows: (1) the Prophet ﷺ visited the graveyard regularly, (2) he spoke to the deceased, greeting them with salam, and (3) he taught this practice to his wives and Companions.

He Wept at His Mother's Grave

The Prophet ﷺ visited the grave of his mother and wept, and those around him wept. He said: 'I asked my Lord for permission to seek forgiveness for her, but He did not grant me permission. I asked Him for permission to visit her grave, and He granted me permission. So visit graves, for they remind you of death.'

Abu Hurayra (رضي الله عنه)Sahih Muslim, no. 976

The Prophet ﷺ specifically sought permission from Allah to visit his mother's grave — and was granted it. He then used this as the basis for a general command to visit graves. His weeping at the grave demonstrates that emotional connection at a gravesite is natural and prophetically sanctioned.

He Taught Supplications for Graves

I said: 'O Messenger of Allah, what shall I say when I visit the graves?' He said: 'Say: Peace be upon you, O people of the dwellings, from among the believers and Muslims. May Allah have mercy on those who have gone ahead and those who come later. We shall, if Allah wills, join you.'

Aisha (رضي الله عنها)Sahih Muslim, no. 975

The fact that the Prophet ﷺ taught a specific supplication for grave visits proves it was an established, expected practice — not something merely tolerated. You do not compose liturgical formulas for prohibited acts.

Visiting the Graves of the Righteous

Visiting the graves of scholars, saints, and pious Muslims — to make supplication to Allah and seek blessings from the proximity — is supported by Companion practice and established scholarly consensus:

It is recommended to visit the graves of the righteous and to seek blessings by being in their proximity. This is established by the practice of the salaf (early generations) and the consensus of scholars.

Imam al-Nawawi, Author of al-Adhkar (d. 676 AH / 1278 CE)al-Adhkar; al-Majmu'

The scholars are clear on the distinction:

  • Permissible: Visiting a grave, making du'a to Allah there, asking Allah by virtue of the deceased's rank, reciting Quran and dedicating the reward to the deceased
  • Impermissible: Worshipping the grave itself, prostrating to it, asking the deceased for things independently of Allah, or believing the dead person has autonomous power

Common Claim

Visiting graves leads to shirk (polytheism), so it should be prohibited.

What Scholars Actually Say

The Prophet ﷺ himself commanded grave visitation after the community was established in tawhid. If grave visitation inherently led to shirk, the Prophet ﷺ would not have commanded it, visited graves himself, taught supplications for it, and wept at his mother's grave. Banning what the Prophet ﷺ commanded because of what might happen is not jurisprudence — it is overriding the Sunna with personal fear.

Common Claim

You should not travel to visit a grave — the Prophet ﷺ said not to travel except to three mosques.

What Scholars Actually Say

The hadith about three mosques ("Do not set out on a journey except to three mosques: al-Masjid al-Haram, my mosque, and al-Masjid al-Aqsa") refers to mosques specifically — it means no mosque has special sanctity worth traveling to except these three. It does not prohibit traveling for other purposes (trade, visiting family, seeking knowledge, etc.). The majority of scholars do not extend this hadith to prohibit traveling to visit graves. Imam al-Nawawi, Ibn Hajar al-Asqalani, and the majority of scholars across all four madhabs permitted traveling to visit the graves of the righteous.

Visiting Graves: The Sunna and Etiquette

SeekersGuidance

Comprehensive guide to the rulings and etiquette of visiting graves in Islam.

Can Women Visit Graves?

SeekersGuidance

The scholarly discussion on whether women are permitted to visit graves.