In The Name of Allaah, The Most Merciful The Bestower of Mercy.
Allaah [Glorified and Exalted be He] stated:
وَمَا خَلَقْتُ الْجِنَّ وَالْإِنسَ إِلَّا لِيَعْبُدُونِ
مَا أُرِيدُ مِنْهُم مِّن رِّزْقٍ وَمَا أُرِيدُ أَن يُطْعِمُونِ
إِنَّ اللَّهَ هُوَ الرَّزَّاقُ ذُو الْقُوَّةِ الْمَتِينُ
And I (Allah) created not the Jinns and humans except they should worship Me (Alone). I seek not any provision from them (i.e. provision for themselves or for My creatures) nor do I ask that they should feed Me (i.e. feed themselves or My creatures). Verily, Allah is the All-Provider, Owner of Power, the Most Strong. [Soorah Adh-Dhaariyaat: Ayah: 56-58]
Allaah [The Most High] informs [us] that He neither created Jinn and mankind for a jest nor that He will leave them to wander aimlessly and carelessly [without being] commanded [to fulfil obligations] and prohibited [from the forbidden things]. Allaah said:
أَفَحَسِبْتُمْ أَنَّمَا خَلَقْنَاكُمْ عَبَثًا وَأَنَّكُمْ إِلَيْنَا لَا تُرْجَعُونَ
Did you think that We created you in play (without purpose), and that you would not be brought back to Us. [Soorah Al-Muminoon: Ayah: 115]
Do you think that Allaah created you for jest, play and amusement, and that you will not be returned to Him? Nay, rather Allaah created you to worship Him and commanded you to single Him out in [His Lordship, in His Names and Attributes and in worship], and that you obey Him. Allaah informed you that you will return to Him and He will recompense you for your deeds. [So] if [your deeds are good, you will be recompensed] with good and if [your deeds are evil, you will be recompensed with] evil.
Allaah [Glorified be He and free is He from all imperfections] did not create the creation so that He may become mighty through them or become well to do through them; rather Allaah [The Exalted] is free from having a need of anyone. Allaah [The Most High] created them to worship Him [alone] without partners, and for this reason Allaah sent the Messengers, revealed the books and [allowed] Jihaad. [Ref 1]
All of this is for the purpose of [establishing] the worship Allaah [alone] without ascribing any partner to Him. [It is the opposite of the deeds, beliefs, views, practices etc] of those who worship others besides Allaah, such as those who erect buildings over graves and invoke them besides Allaah – offer sacrificial slaughters to them, vow to them, beseeching them for their needs and appealing to them for help. This is exactly the shirk that nullifies one’s declaration of Allaah’s sole right to be singled out in worship [Ref 2] which has been established by the (following) ayah:
وَمَا خَلَقْتُ الْجِنَّ وَالْإِنسَ إِلَّا لِيَعْبُدُونِ
And I [Allah] created not the jinns and humans except they should worship Me [Alone].
And Allaah [The Most High] said:
ذَٰلِكُمُ اللَّهُ رَبُّكُمْ لَهُ الْمُلْكُ ۚ وَالَّذِينَ تَدْعُونَ مِن دُونِهِ مَا يَمْلِكُونَ مِن قِطْمِيرٍ
إِن تَدْعُوهُمْ لَا يَسْمَعُوا دُعَاءَكُمْ وَلَوْ سَمِعُوا مَا اسْتَجَابُوا لَكُمْ ۖ وَيَوْمَ الْقِيَامَةِ يَكْفُرُونَ بِشِرْكِكُمْ ۚ وَلَا يُنَبِّئُكَ مِثْلُ خَبِيرٍ
Such is Allaah, your Lord; His is the Kingdom. And those, whom you invoke or call upon instead of Him, own not even a Qitmeer (the thin membrane over the date-stone). If you invoke (or call upon) them, they hear not your call; and if (in case) they were to hear, they could not grant it (your request) to you. And on the day of Resurrection, they will disown your worshipping them. And none can inform you (O Muhammad) like Him Who is Well-Acquainted (with everything. [Soorah Al-Faatir: Aayaat: 13-14]
This ayah nullifies what the grave worshippers attach themselves to [in worship], such as the Awliyaah [close friends of Allaah], the angels and the righteous people. It nullifies it from different angles:
Firstly, ‘’And those, whom you invoke or call upon instead of Him, own not even a Qitmeer (the thin membrane over the date-stone’’- Meaning: [for example], the person who worships Ahmad Badawee, offers sacrificial slaughters to him, vows to him and embarks on a journey to his grave, then [this person should know] that he [Ahmad Badawee] does not own even the thin membrane over the date-stone.
What is a Qitmeer? It is the thin coil that is [found] around the middle of the date-stone. Have you not seen that you will find in the middle of the date-stone a thin coil? This is the Qitmeer [i.e. the thin membrane]. And indeed those dead people neither own even a thin membrane of a date-stone nor can they give any help, then how can you offer sacrificial slaughters to them, vow to them, seek their aid and assistance?! This is nothing else but misguidance.
Secondly, ‘’If you invoke (or call upon) them, they hear not your call’’- Meaning: Those who go to the grave of Husain, or Badawee, or Abdul-Qaadir, or Sayyidah Zainab or other than them, then indeed they [i.e. those buried in the graves] do not hear the call of those who call upon them. They go to the grave and say, “(Give) Aid! (Give) Aid!” (However) the ayah establishes that:
-They do not even own the coil that is over the date-stone.
-They do not hear you; they do not know your state of affairs; they do not have any knowledge of your call; they are neither able to benefit you nor repel harm from you.
-And regarding the statement of Allaah: ‘’And if (in case) they were to hear, they could not grant it (your request) to you’’ means that even if it were decreed and decided that they will hear your call, then indeed they will never be able to bring you any benefit nor can they repel harm from you.
Thirdly, ‘’And on the day of Resurrection, they will disown your worshipping them’’– Meaning: They will disown you and will say: ‘’O our Lord! We were not aware of their worshipping us.’’ They will disown you and you will disown them, but you will be very far from that which you were promised [i.e. had you worshipped Allaah alone, you would have received the great reward of paradise, but that promise cannot be given to you even after you seek to disown those whom you used to worship and invoke in the life of this world because you died whilst worshipping them]. Allaah stated:
إِذْ تَبَرَّأَ الَّذِينَ اتُّبِعُوا مِنَ الَّذِينَ اتَّبَعُوا وَرَأَوُا الْعَذَابَ وَتَقَطَّعَتْ بِهِمُ الْأَسْبَابُ
When those who were followed disown (declare themselves innocent of) those who followed (them), and they see the torment, then all their relations will be cut off from them. [Baqarah: Ayah: 166]
And based on the (above) four points, the Ayah shows the invalidity of all that which these people depend upon; be it their dependence and calling upon the righteous people, the close friends of Allaah or the Prophets. And the Aayaat of the Qur’aan that convey this meaning are numerous.
And there is (also) the statement of Allaah:
وَمَنْ أَضَلُّ مِمَّن يَدْعُو مِن دُونِ اللَّهِ مَن لَّا يَسْتَجِيبُ لَهُ إِلَىٰ يَوْمِ الْقِيَامَةِ وَهُمْ عَن دُعَائِهِمْ غَافِلُونَ
وَإِذَا حُشِرَ النَّاسُ كَانُوا لَهُمْ أَعْدَاءً وَكَانُوا بِعِبَادَتِهِمْ كَافِرِينَ
And who is more astray than one who calls on (invokes), besides Allaah, such as will not answer him till the Day of Resurrection, and who are (even) unaware of their calls (invocations) to them. And when mankind are gathered (on the Day of Resurrection), they (false deities) will become their enemies and will deny their worshipping. [Soorah Al-Ahqaaf: Ayah:5-6].
Likewise, there is this other Aayah:
أَيُشْرِكُونَ مَا لَا يَخْلُقُ شَيْئًا وَهُمْ يُخْلَقُونَ
وَلَا يَسْتَطِيعُونَ لَهُمْ نَصْرًا وَلَا أَنفُسَهُمْ يَنصُرُونَ
Do they attribute as partners to Allaah those who created nothing but they themselves are created? No help can they give them, nor can they help themselves. [Soorah Al-Araaf: Aayaat: 191-192]
This means that you have set up as partners to Allaah those who are not able to create, [rather] they are creatures, and they are subjugated and nurtured by Allaah. They are neither able to assist you nor bring you benefit, nor are they able to repel harm from you. They are neither able to benefit themselves nor repel harm from themselves.
Therefore, based on this you come to know that erecting buildings over graves, seeking aid from its inhabitants, offering sacrificial slaughters to them and vowing to them is nothing else but shirk.
And this is what the Mighty Qur’aan has demonstrated- that Allaah (alone) is the One who (controls) benefit and harm, just as is found in the story of the Messenger [sallal-laahu-alayhi-wasallam] during the battle of Uhud; when his head was wounded, blood flowed on his face and his front tooth was broken. So he began to wipe away the blood from his face, whilst saying: ‘’How can a people who injure the head of their Prophet be successful.’’ So Allaah (The Most High) revealed the (ayah):
لَيْسَ لَكَ مِنَ الْأَمْرِ شَيْءٌ أَوْ يَتُوبَ عَلَيْهِمْ أَوْ يُعَذِّبَهُمْ فَإِنَّهُمْ ظَالِمُونَ
Not for you (O Muhammad), but for Allaah is the decision.’’ [Soorah Aali Imraan: Ayah: 128]
So the decision is in the hand of Allaah, and the Messenger (sallal-laahu-alayhi-wasallam) himself can neither protect himself from harm nor bring benefit to himself; rather the decision is in the hand of Allaah.
Allaah knows best; and may Allaah’s peace and blessings be upon Muhammad, his family and companions.
[Source: An Excerpt from ‘Al-Fataawaa Wad-Duroos Fil Masjid Al-Haraam’ page:64-67. slightly paraphrased]