Praise be to Allaah.
1. Visits to graves fall into two categories:
(i) visits which are prescribed in Islam and are required for the purpose of making du'aa' for the dead, praying for mercy for them, remembering death and preparing oneself for the Hereafter. The Prophet (peace and blessings of Allaah be upon him) said: "Visit the graves, for they remind you of the Hereafter." (Narrated by Muslim, 976).
The Prophet (peace and blessings of Allaah be upon him) used to visit graves, as did his Companions, may Allaah be pleased with them.
It was reported that 'Aa'ishah said that when it was her night for the Messenger of Allaah (peace and blessings of Allaah be upon him) to stay with her, he would go out during the latter part of the night to (the cemetery of) al-Baqee' and say, "Peace be upon you, dwellings of the believing people. There has come to you that which you were promised, , and if Allaah wills we will follow you soon. O Allaah, forgive the people of Baqee' al-Gharqad." (Narrated by Muslim, 974).
(ii) the second type is bid'ah (innovation), which is visiting graves for the purpose of calling upon their occupants, seeking their help, offering sacrifices to them and making vows to them. This is forbidden and is a major form of Shirk (shirk akbar). Connected to this is the practice of visiting graves to offer du'aa', perform salaah and read Qur'aan there. This is all bid'ah and is not prescribed in Islam.
2. With regard to praying (performing salaah) at a grave. If what is meant is Salaat al-janaazah (the funeral prayer), this is permissible and is not forbidden. But if what is meant is to perform fard or naafil prayers, this is forbidden and is haraam.
The evidence for the permissibility of praying Salaat al-Janaazah in the graveyard:
It was reported from Abu Hurayrah that a black man or a black woman who used to clean the mosque died. The Prophet (peace and blessings of Allaah be upon him) asked about him and they said, "He died." He said, "Why did you not tell me? Show me his grave." Or he said, "her grave." So he went to the grave and prayed for her. (Narrated by al-Bukhaari, 446; Muslim, 956).
The evidence that it is not permissible to offer any salaat other than janaazah in the graveyard:
(a) 'Aa'ishah and 'Abd-Allaah ibn 'Abbaas said: "When (death) approached the Messenger of Allaah (peace and blessings of Allaah be upon him), he started to cover his face with a cloak of his. When he became distressed he lifted it from his face and said, "May Allaah curse the Jews and the Christians, for they have taken the graves of their Prophets as places of worship." [The narrator said:] he was warning against doing what they did." (Narrated by al-Bukhaari, 425; Muslim, 531).
(b) Abu Marthad al-Ghanawi said: the Messenger of Allaah (peace and blessings of Allaah be upon him) said: "Do not sit on graves and do not pray facing them." (Narrated by Muslim, 972).
3. With regard to the 'Urs which is held every year: if this involves some kinds of acts of worship, or if the people who attend think that this will bring them closer to Allaah, or if it involves acts of disobedience and sin, then it is not permissible to attend it or take part in it. Even if it is free of all these matters, you should still not attend it, because adopting an occasion as an "Eid" or festival (a regular annual event) other than the Eids precribed in Islam is bid'ah (reprehensible innovation) and is forbidden. The belief of those present, that the soul of the "wali" attends this 'Urs is an innovated and forbidden belief, because in the future this may be taken as being a part of the religion, and it will lead people astray. So this event must be denounced and people must be warned against it, and you should not attend it. And Allaah is the guide to the straight path.
4. With regard to asking a righteous person to make du'aa' for you when he is still alive - this is permissible, because there is the hope that his du'aa' may be answered because of his righteousness. The evidence for this is:
(a) It was reported from 'Uthmaan ibn Haneef (may Allaah be pleased with him) that a blind man came to the Prophet (peace and blessings of Allaah be upon him) and said: "Pray to Allaah to heal me." He said, "If you wish, I will pray for you, and if you wish, I will delay that, and that will be better." (According to another report: "If you wish, be patient - that will be better for you.") He said, "Pray for me." So he commanded him to do wudoo' and to do it well, and to pray two rak'ahs"
(Narrated by Ahmad, 4/138; al-Tirmidhi, 5/569; Ibn Maajah, 1/441; it is a saheeh hadeeth).
(b) It was reported that Anas said: whilst the Prophet (peace and blessings of Allaah be upon him) was giving the khutbah (sermon) on Friday, a man stood up and said, "O Messenger of Allaah, the horses have died and the sheep have died. Pray to Allaah to give us rain." So he spread his hands and prayed (made du'aa'). (Narrated by al-Bukhaari, 890; Muslim, 897).
5. If a wali or Prophet dies, it is not correct, according to sharee'ah, to ask him to make du'aa' for you, because he has been cut off from this world. This is a kind of shirk which is not committed by any of the righteous people of this Ummah, the Sahaabah and those who follow them.
Allaah says (interpretation of the meaning):
"And who is more astray than one who calls on (invokes) besides Allâh, 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"
Shaykh Al-Islam (Ibn Taymiyah - may Allaah have mercy on him) said: To explain further: if what the person wants is something that none is able to do except Allaah - such as asking for healing from sickness, for people or animals, or for his debts to be paid off in some manner that he does not specify, or for his family to be safe and sound, or to be protected from calamity in this world or the next, or for help against his enemy, or for his heart to be guided, or for his sins to be forgiven, or for him to be admitted to Paradise or saved from Hell, or for help to learn knowledge and the Qur'aan, or for his heart to be reformed, his attitude to be made good, his soul to be purified and so on - all of these are things which it is not permissible to seek from anyone other than Allaah. It is not permissible to say to an angel or a Prophet or a shaykh, whether he is alive or dead, "forgive my sin" or "help me against my enemy" or "heal my sick loved one" or "protect my family or my livestock" and the like.
Whoever asks any created being - no matter who he is - for any of these things, is a mushrik who associates others with his Lord. He is like the mushrikeen who worship angels, Prophets and statues which they have created in their image, and his prayer is like the prayers of the Christians to the Messiah and his mother. Allaah says (interpretation of the meaning):
"And (remember) when Allaah will say (on the Day of Resurrection): "O 'Eesaa (Jesus), son of Maryam (Mary)! Did you say unto men: 'Worship me and my mother as two gods besides Allaah?' " He will say: "Glory be to You! It was not for me to say what I had no right (to say)." [al-Maa'idah 5:116]
"They (Jews and Christians) took their rabbis and their monks to be their lords besides Allaah (by obeying them in things which they made lawful or unlawful according to their own desires without being ordered by Allaah), and (they also took as their Lord) Messiah, son of Maryam (Mary), while they (Jews and Christians) were commanded [in the Tawraat (Torah) and the Injeel (Gospel)] to worship none but One Ilaah (God - Allaah) Laa ilaaha illa Huwa (none has the right to be worshipped but He). Praise and glory be to Him (far above is He) from having the partners they associate (with Him)." [al-Tawbah 9:31]
(Majmoo' al-Fataawaa, 27/ 67, 68).
And he [Ibn Taymiyah] said:
Whoever comes to the grave of a Prophet or a righteous man, or what he believes to be the grave of a Prophet or a righteous man although it is not, and asks him for something and seeks his help, one of the three following scenarios applies:
(i) he is asking him for something that he needs, such as to cure his sick animals or to pay off his debt or to take revenge on his enemy or to protect him, his family and his livestock, and other things which no one can do except Allaah. This is obvious shirk and he must be told to repent. If he repents, all well and good, otherwise he must be executed.
If he says, I am asking him because he is closer to Allaah, so that he can intercede for me with regard to these matters, because I am seeking Allaah's help through his virtue, just as people seek the ruler's help through those who are close to him - this is also like the actions of the mushrikeen and Christians, who claim that they take their priests and monks as intercessors and ask them to intercede for them with their requests. Allaah tells us that the mushrikeen say:
" 'We worship them only that they may bring us near to Allaah.'" [al-Zumar 39:3 - interpretation of the meaning].
And Allaah says (interpretation of the meaning):
"Have they taken (others) as intercessors besides Allaah? Say: "Even if they have power over nothing whatever and have no intelligence?" Say: "To Allaah belongs all intercession. His is the Sovereignty of the heavens and the earth. Then to Him you shall be brought back." [al-Zumar 39:43-44]
"You (mankind) have none, besides Him, as a Wali (protector or helper) or an intercessor. Will you not then remember (or receive admonition)?" [al-Sajdah 32:4]
"Who is he that can intercede with Him except with His Permission?" [al-Baqarah 2:255].
The difference between Him and His creation is clear: people usually ask some of their leading figures who are in positions of honour to intercede for them with their leaders, so that intercessor asks the leader and he meets the person's request because he hopes to gain something thereby, or because he is afraid of him, or because he is too shy to refuse, or because he is being friendly towards him, etc. But no one intercedes with Allaah, may He be glorified, until He gives permission to the intercessor. He only does what He wills, and the intercession of the intercessor is only made by His permission. The entire matter rests with Him The idea of many misguided people, that this person is closer to Allaah than I am, and I am far away from Allaah and cannot call upon Him except through this mediation etc., all of these ideas are ideas of shirk. Allaah says (interpretation of the meaning):
"And when My slaves ask you (O Muhammad ) concerning Me, then (answer them), I am indeed near (to them by My Knowledge). I respond to the invocations of the supplicant when he calls on Me (without any mediator or intercessor)" [al-Baqarah 2:186]
In al-Saheeh it was reported that when they were on a journey, they were saying Takbeer ("Allaahu akbar") in loud voices, and the Prophet (peace and blessings of Allaah be upon him) said:
"O people, take it easy! You are not calling upon One Who is deaf or absent; you are calling upon One Who is All-Hearing and Ever Near. The One upon Whom you are calling is closer to any one of you than the neck of his camel."
Allaah has commanded all people to pray to Him and call on Him, and He has commanded them all to say (interpretation of the meaning):
"You (Alone) we worship, and You (Alone) we ask for help (for each and everything)." [al-Faatihah 1:5].
And He has told us that the Mushrikeen say:
" 'We worship them only that they may bring us near to Allaah.'" [al-Zumar 39:3 - interpretation of the meaning].
Moreover, it may be said to this mushrik: if you call upon this person, that means you think that he knows more about your situation, is more able to grant you what you ask for and is more merciful towards you. This is ignorance, misguidance and kufr. If you know that Allaah has more knowledge and is more able and more merciful, then why do you fail to ask Him, and instead turn to others? Have you not heard what al-Bukhaari and others narrated from Jaabir (may Allaah be pleased with him), who said: the Messenger of Allaah (peace and blessings of Allaah be upon him) used to teach us to pray Istikhaarah (du'aa' seeking guidance from Allaah) in all our affairs, just as he taught us the Surahs of the Qur'aan.
Even if you know that this person is closer to Allaah than you and of a higher status than you, this may be true, but what you are implying is wrong. Even if he is indeed closer to Allaah and of a higher status, that only means that Allaah will reward him and give him more than you. It does not mean that if you call on him, Allaah will answer your prayer more than He would do if you called upon Him yourself. If you are deserving of being punished and of having your supplication rejected, for example, because your du'aa' is offered in an improper manner, then no Prophet or righteous person will help you to do something that Allaah dislikes and is angry with. Even if that is not the case, then you should ask from Allaah because Allaah is more merciful.
(Majmoo' al-Fataawaa, 27/72-75
We advise our brother to learn more about this matter by referring to the books mentioned above.
And Allaah knows best.