The word 'Aulia' singular 'wali' comes from the root word of wilaya. Wilaya is the opposite of enmity (adawaa). The Wali is therefore the one who is close.
Allah has explained in His Book, and in the Sunnah of His Messenger (sallalahu alaihe wa-sallam) that He has aulia among the people and that shaitaan also has his aulia. The Qur'aan mentions the allies of Allah.
"Indeed there is no fear upon the aulia of Allah, nor shall they grieve; those who believe and used to fear Allah much. For them are glad tidings in this life and the Hereafter..." [Soorah Yunus (10): 62]
"Allah is the protector (ally) of those who believe, He takes them out of darkness into light." [Soorah Baqarah (2): 257]
The allies of devil have also been mentioned in the Qur'aan: "..As for those who disbelieve, their allies are the taaghoot who take them out of the light and into the darkness. Those are the people of fire, and they will be in it forever." [Soorah Baqarah (2): 257]
"We have made the devils allies of those who do not believe; those who commit outrages and then say: "We found our predecessors on this (tradition)" Surely they have taken the devils as allies instead of Allah, and they think that they are on guidance" [Soorah Al-A'raf (7): 27-28]
After knowing that there are among people allies of the Merciful and the allies of the devil, it becomes very important to differentiate between these groups by means of the criterion, as described by Allah and His Prophet (sallalahu alaihe wa-sallam) as follows:
The First and Foremost Condition of an Ally of Allah - Taqwa and Belief in Allah
No slave can be an ally of Allah, unless he has the characteristics of faith and pious practices, since Allah has made faith and piety a pre-condition for His Wilaya. He said: "Indeed there is no fear upon the aulia of Allah, nor shall they grieve, those who believe and used to fear Allah much (i.e. have Taqwa - piety). For them are glad tidings in this life and the Hereafter..." [Yunus (10): 62]
Abu Huraira (may Allah be pleased with him) narrated that the Messenger of Allah (sallalahu alaihe wa-sallam) said: "Allah, the Exalted said: "Whoever takes a Wali (loyal slave) of Mine as an enemy, I will wage war on him; and My slave will not perform any act with which he draws closer to Me, more beloved to Me then when he fulfills what I have ordained on him; and My salve will keep drawing closer to Me by performing the Nawafil (voluntary acts of worship) until I love him, and when I love him, I will be his hearing with which he hears, his sight with which he sees, his hands with which he strikes, and his legs with which he walks; and if he asks Me, I will give him; and if he seeks refuge with Me, I will grant him refuge." [Saheeh Bukhari]
From this narration and the above-mentioned Qur'aanic verse, we know that the aulia of Allah are those who believe in Allah and give Him their full loyalty Thus, they love all that Allah loves, hate what Allah hates, are pleased with what Allah is pleased with, despise what Allah despises, they enjoin what Allah enjoins, forbid that what He forbids, give to those whom Allah loves for them to be given, and withhold from those whom Allah loves not to receive, since Prophet (sallalahu alaihe wa-sallam) explained the best handhold of faith to be love and hate for the sake of Allah: "The most dependable handhold on faith is: love for the sake of Allah and hatred for the sake of Allah." [At-Tirmidhee]
"Whoever loves for Allah, hates for Allah, gives for Allah, and withholds for Allah, has sought the completion of his faith." [Abu Dawood]
Belief (imaan) of necessity entails belief in Allah, His angels, His books, His Prophets, and the Last Day: "Say: We believe in Allah and in that which has been sent to us and in that which was sent to Ibrahim, and Ismail and Ishaq and Ya'qub, and the tribes and that which was given to Moosa and Isa and that which was given to the Prophets form their Lord. We do not differentiate between any of them, and we submit to Allah. And so, if they believe in that which you believe, they have achieved guidance, but if they turn away, they are surely in rebellion. Allah will suffice you against them and He is the all-hearing, the all-knowing." [Soorah al-Baqarah (2): 136-137]
"The Prophet has believed in that which is sent to him from his Lord as have the believers. All of them believe in Allah, His angels, His books and His Messengers. We do not differentiate between any of His messengers, and they say: "We hear and we obey. (We seek)Your forgiveness, our Lord to You is the return (of all). Allah does not burden any soul beyond his scope. He gets reward for that (good) which he has earned, and he is punished for that (evil) which he has earned." [Soorah Baqarah (2): 285-6]
"This is a book in which there is no doubt, a guidance for those who are pious. Those who believe in the unseen, establish prayer, and spend out of what We have provided for them. Those who believe in that which was sent down to you and that which was sent down to those before you, and certainly of faith in the existence of the Hereafter. Such are on a true guidance from their Lord, and such are the successful." [Soorah al-Baqarah (2): 1-5]
Thus, a necessary component of faith (eeman) is to believe that Muhammad (sallalahu alaihe wa-sallam) is the seal of the prophets, and there is no prophet after him, and that Allah sent him to all of the two possessors of free will: humans and jinns. From the moment he was made a prophet, Allah made him the criterion between His allies and His enemies, none are the allies of Allah except one who believes in Muhammad (sallalahu alaihe wa-sallam) and in that with which he was sent, and follows it openly and in secret. Whoever claims love of Allah and alliance with Allah but does not follow the Prophet (sallalahu alaihe wa-sallam) is not one of the allies of Allah. He is one of the allies of shaitaan.
Allah said: "Say (O Mohammad) If you truly love Allah, then follow me so that Allah loves you." [Al-Imraan (3): 31]
Allah made it clear in the verse that Allah loves whoever follows the Prophet, and whoever claims the love of Allah, but does not follow the Prophet, is not from the allies of Allah. Al-Hasan al-Basri said about this verse: "A group of people claimed to love Allah, so He sent down this verse as a test for them."
And secondly to believe in all that which he (Prophet) was sent with. Anyone who does not believe in it is not a believer, much less a pious ally of (waly) of Allah. Whoever believes in part of what he brought and rejects part is a kaafir, and not a believer:
"Those who disbelieve in Allah and His Prophets and seek to differentiate between Allah and His prophets, and they say: "We believe in some and we reject some" Such are true disbelievers, and We have prepared for the disbelievers a humiliating punishment. As for those who believe in Allah and His prophets, and sought not to differentiate between any of them. We shall give them their rewards. And Allah is Ever Oft-Forgiving and Most Merciful." [(4): 150-152]
Whatever stage the person reaches in terms of asceticism, devotion, and knowledge, but without belief in the entire message brought by Muhammad (sallallahu alaihe wa-sallam), it can never make him a believer, nor an ally of Allah. Allah said: "Whoever turns away from the reminder of the Merciful, we will assign to him a devil, who will be a partner to him." [(43): 36]
The reminder is the reminder with which He sent His Messenger such as the Qur'aan. So, whoever does not believe in the Qur'aan, and all the information contained therein, has turned away from it, and so is assigned a shaitaan. He turns himself as blind from the Book of Allah and Allah will turn him blind on the Day of Judgment:
"And whoever turns away form my reminder will have an oppressive, restricted life, and We will resurrect him on the Day of Qiyamah: blind. He will say: "Oh my Lord! Why have you resurrected my blind, while I used to see?" (Allah) will say: "Just as My verses came to you and you forgot them, today you are forgotten." [Soorah Ta-Ha (20): 124-126]
This verse clearly shows that 'my reminder' here is the same thing as 'my verses' which Allah sent down. Thus, even if someone mentions Allah (which is known as 'dhikr' in Arabic) constantly, day and night, with devotion, but at the same time is not a follower of Allah's dhikr (Qur'aan) which He sent down to His prophet, he would be one of the allies of shaitaan, even if he were to fly through the air, or walk on water.
Faith also includes - belief that Prophet is the intermediary between Allah and His creation for the purpose of delivering His orders and forbiddance, His promises and threats, and the definition of Halaal and the Haraam. The Halaal is that which Allah and His Messenger have declared Halaal, and the Haraam is what Allah and His Messenger have ordained, because Allah commands the believers to obey him:
"O you who believe! Obey Allah and Obey the Messenger and make not vain your deeds." [Soorah Muhammad (47): 33]
"He who obeys the Messenger had obeyed Allah" [Soorah An-Nisa (4): 80]
He also says: "Whatsoever the Messenger gives you take it and whatsoever he forbids you refrain from it."
Thus, whoever believes that any waly has a way to Allah without following the Prophet (sallalahu alaihe wa-sallam) is a kaafir, and is an ally of the devil.
Actions of the Allies of Allah
The allies of Allah are of two levels: forerunners those who brought near - and those of the right hand who act in moderation. Allah, the Exalted says reminding the Day of Judgement: "And you (all) will be in three kinds (i.e separate groups). So those on the Right Hand and Who will be those of the Right Hand? And those on the Left Hand and who will be those on the Left Hand? And those foremost will be foremost in Paradise. They will be those nearest to Allah." [Soorah al-Waqiyah (56): 8-12]
And again Allah says in the end of the same Soorah: "Then, if the dying person be of the Muqarraboon (those brought near to Allah.) (There is for him) rest and provision, and a Garden of delights (Paradise). And if he be of those on the Right Hand. Then there is safety and peace for those on the Right Hand. But if he be of the denying then for him is entertainment with boiling water. And burning in Hell-Fire." [(56): 88-94]
And the actions of these two groups are mentioned in the Hadeeth of Prophet Muhammad (sallallahu alaihe wa-sallam): "Allah says: "Whoever takes a Wali (loyal slave) of Mine an enemy, I will wage war on him; and My slave will not perform any act with which he draws closer to Me, more beloved to Me then when he fulfills what I have ordained on him; and My salve will keep drawing closer to Me by performing the Nawafil (voluntary acts of worship) until I love him, and when I love him, I will be his hearing with which he hears, his sight with which he sees, his hands with which he strikes, and his legs with which he walks; and if he asks Me, I will give him; and if he seeks refuge with Me, I will grant him refuge." [Saheeh Bukharee]
Consequently, the righteous - those of the Right Hand are those who seek to come close to Allah with obligatory actions: they do that which Allah has ordered them to do, and avoid that which Allah has forbidden them, and do not demand of themselves the doing of the commendable but less than obligatory (i.e. mandoob), or the avoiding of some of the disrecommendable of the allowed (i.e. makrooh)
As for the forerunners those brought near, they sought to come close to Allah with extra efforts after the obligatory. They did the obligatory and the commendable, and avoided the forbidden and the non-recommended. When they sought to come close to Him with everything within their ability of that which they love, Allah's love for them became complete, as Allah says: "...My salve will keep drawing closer to Me by performing the Nawafil (voluntary acts of worship) until I love him..." [Saheeh Bukharee]
The Allies of Allah have no Special Appearance
The allies of Allah have no special appearance with which they differ form other people. They have no special dress from other than just being permissible. Rather, they are to be found in all categories of the nation of Muhammad (sallallahu alaihe wa-sallam). However, the Qur'aan and the Sunnah show clearly that the best people in the sight of Allah is the one with the most of Taqwa (pious practice):
"O people, we have created you from a male and a female and made you in peoples and tribes that you may know each other. Verily, the noblest of you in the sight of Allah is the greatest in righteous practice." [Soorah al-Hujarat (49): 13]
Abu Hurairah narrates in a Saheeh Hadeeth: "The Prophet of Allah (sallalahu alaihe wa-sallam) was asked: "Which people are the best? He said: "Those greatest in taqwa (righteous practice)" [Bukhareee and Muslim]
Allies of Allah are not ma'soom (protected) from mistakes
It is not a condition for an ally of Allah that he be free of (protected from) mistakes and errors. It is quite possible that some knowledge of the shari'ah may be hidden from him, just as it is possible for him to be confused about some issues in Islam But, he may not necessarily because of this, leave the ranks of allies of Allah, since Allah has overlooked and forgiven for this Ummah error, acts of forgetting, and things done under compulsion:
"There is no burden upon you for that in which you were mistaken, rather that which you have done with the full determination of the heart." [Soorah Ahzab (33): 5]
Abu Hurairah (may Allah be pleased with him) said: "Prophet (sallalahu alaihe wa-sallam) said: "When a ruler exerts himself to arrive at the correct ruling, and is correct, he gets two rewards and when he exerts himself but is mistaken, he gets one reward." [Bukharee and Muslim]
Since, it is possible for any ally of Allah to make a mistake. It can never be obligatory upon the people to believe in everything any one of them says, except that in the case that one of them is a prophet. Rather, it is obligatory for him to measure all of that up to the criterion of that which the Prophet (sallalahu alaihe wa-sallam) brought. If it is in agreement therewith then he can accept it, but if it is in disagreement then he must reject it, and if he cannot be sure whether it is in accordance with the Prophet's message or at variance with it, he must refrain from believing it or applying it.
The second Caliph Umar (may Allah be pleased with him), regarding whom Prophet of Allah (sallalahu alaihe wa-sallam) said: "In previous nations there were individuals who were addressed (with the truth). If there are such people in my nation, Umar is the one of them." [Bukharee and Muslim]
"Verily, Allah has put the truth on the tongue of Umar and in his heart." [At- Tirmidhee (hasan)]
But, Umar always did that which was obligatory upon him: i.e. - to measure things that occurred to him against that with which the Prophet (sallalahu alaihe wa-sallam) was sent. He never said: "I am mahaddath, I receive inspiration and visions, and so you should accept that which I say and not oppose me therein."
Heart is an intuitions and not protected from falling into errors, and so one needs always to measure them against that which has been brought by the Prophet (sallalahu alaihe wa-sallam), the protected from falling into error. And the early scholars of Islam have unanimously agreed that the opinions of any man can be accepted and rejected i.e. they are open to questions except for the statements of the Prophet.
The point we are making here is an issue of complete consensus of the allies of Allah:
It is obligatory upon the allies of Allah to hold tight to the criterion; the Qur'aan and the Sunnah, and no one of them is ma'soom; i.e. protected against falling into errors, such that it is permissible to him or to his followers to follow that which comes to his heart without subjecting it to the test of the Qur'aan and the Sunnah. Whoever does not accept this is in no way or shape or form among the allies of Allah, whom Allah has ordered us to emulate. Such a person is either 'kafir' or is engaged in extreme and excessive foolishness and ignorance.