The term “wali” has been used in several meanings some of the most important of which are the following:
A) Wali meaning guardian;
B) Wali meaning friend;
C) Wali meaning helper or assistant
Although each of three meanings can be used with regards to Imam Ali (a.s.), considering the narratives related in this regard, wali in the foregoing sentence in Adhan refers to the first meaning. That is to say, Ali is the guardian and in charge of the affairs and he is more entitled to be in authority on all matters of faith and law. Thus guardianship has been granted to him by God in the same way as prophethood was granted to the Messenger of Allah, Prophet Muhammad – peace and blessings of Allah be upon and his pure family.
The question to deal here with is: Is “Ali waliullah” a part of Adhan? A brief answer is that as per the sayings of Ahlulbayt (a.s.) and edicts of Shia’s grand jurists, Adhan consists of eighteen sentences of which the sentence “Ashhadu anna alian waliullah” is not a part and which should not be recited with the intention that it is a part of Adhan.
In order to give a precise answer to the question, we shall follow up the discussion in three parts:
1) Is it basically okay to recite “Ashhadu anna alian waliullah” in Adhan or is it totally wrong and false?
2) If it is supposedly correct, is it a part of Adhan or not?
3) If it is not a part of Adhan, is there any problem in reciting it in Adhan without considering it as a part?
In order to reply to the first part of the question, it would first be necessary to deal with the meaning and import of the word “wali”.
Meaning of “wali”:
A) Wali in the sense of being a guardian or custodian: There are many Quranic verses in which the word “wali” has been used in the same meaning e.g. “You have not besides Him any guardian or any intercessor”.
B) Wali in the sense of being a close friend: There are also verses in the Quran with the word “wali” meaning friend. One of those verses is the following: “The good deed and the evil deed are not alike. Repel the evil deed with one which is better, then lo! he, between whom and thee there was enmity (will become) as though he was a bosom friend.”
C) Wali in the sense of helper and aide: The Holy Quran says, “And the believers, men and women, are protecting friends one of another.”
Without doubt, there is no objection or problem in using "Waliullah" for believers in the second and third meaning (friend and helper). In fact, there are traditions transmitted by both Shiite and Sunni narrators with the word "wali" used in these meanings.
As for the first meaning, it should be said that there are many narratives in which Ali (a.s.) has been introduced as the guardian, master and more entitled to be in authority in the same way as Holy Prophet (pbuh) was. Of course, Ali is a divinely-appointed leader; he was appointed as guardian and master of the Ummah by God in the same way as Prophet Muhammad (pbuh) was appointed as the Messenger of God.
As for whether "Ashhadu anna alian waliullah" is a part of Adhan or not, there are narrations from the Ahlulbayt (a.s.) which expressly state that Adhan consists of eighteen sentences. Those sentences are the following:
Allahu Akbar, Allahu Akbar, Allahu Akbar; Ash hadu an la ilaha illal lah, Ash hadu an la ilaha illal lah; Ash hadu anna Muhammadan Rasu lul lah, Ash hadu anna Muhammadan Rasu lul lah; Hayya’alas Salah, Hayya’alas Salah; Hayya’alal Falah, Hayya’alal Falah; Hayya’ala Khayril ‘Amal, Hayya’ala Khayril ‘Amal ; Allahu Akbar, Allahu Akbar; La ilaha illal lah; La ilaha illal lah.
Thus, "Ashhadu anna alian waliullah" is not a part of Adhan. Shia jurists have issued verdicts on the basis of these narrations saying that the third testimony is not a part of Adhan.
Imam Khomeini (may Allah bless him) says in this regard: "Adhan consists of the following 18 sentences: Allahu Akbar four times; Ash hadu an la ilaha illal lah; Ash hadu anna Muhammadan Rasu lul lah; Hayya’alas Salah; Hayya’alal Falah; Hayya’ala Khayril ‘Amal; Allahu Akbar; La ilaha illal lah each two times." Then he says, "Ash hadu anna Aliyyan Waliullah is not a part of either Adhan or Iqamah."
The next question that has to be dealt with is: Does reciting "Ashhadu anna alian waliullah" affect the prayers or not?
Obviously, there is a problem in reciting the third testimony as a part of Adhan. Some have said that if it is recited in such a way that it does not sound to be like one of the sentences of Adhan, there would be no problem. At the most, the spurious argument that is likely to be raised is that reciting the third testimony is a mere bid’ah (innovation).
Considering that bid’ah means adding to the religion what is not a part of it, if someone considers this sentence to be a part of Adhan and recites it with such an intention, it is bid’ah and forbidden. However, since none of the Shiite jurists and grand scholars considers it as a part of Adhan and if someone recites it in a way such that it does not turn out to be like one of the sentences of Adhan and Iqamah, it would not be bid’ah and there would be no problem in it.
In addition, we come across narrations in our textual resources which say that whenever a person testifies to the prophecy of Holy Prophet (pbuh), he should also testify to the successorship (wilayah) of the Commander of Faithful, peace be upon him.
In any case, the reason why Shiite jurists allows the recitation of the third testimony in Adhan, not as a part, lies in the unrestricted narratives which say: “Whenever you testify to the oneness of God and the prophecy of Muhammad, you should testify also to the mastership of Ali bin Abi Tablib (a.s.).” Since this narrative is absolute and unrestricted, it includes Adhan and Iqamah also. Therefore, whenever someone testifies to the oneness of God and prophecy of the Holy Prophet (pbuh), he will also testify to the wilayah (guardianship) of the Commander of Faithful, Ali (a.s.) and this does not at all imply that the third testimony is a part of Adhan.
Also, there are special narrations which confirm the validity of reciting the third testimony in Adhan. Hence, considering the lofty rank and position of the Commander of the Faithful, there would be no problem in reciting “Ali waliullah” in Adhan and in the Talqin (a funeral rite) of a dead body with the intention of Qurbat (seeking nearness to God) or Tabarruk (as a blessing), not as a part.
It is to be noted that many Sunni scholars admit that the sentence “al-salaatu khayrun min al-nawm” (prayer is better than sleep) is not a part of Adhan and it is one of the innovations of the second caliph. It has been reported from Malik bin Anas that the Muezzin (one who calls for prayers) went to Umar to wake him up for Fajr prayers. He saw Umar sleeping. Then he said, “al-salaatu khayrun min al-nawm”. Umar then ordered him to recite this same sentence in Adhan also.
The question is that what justifies the recitation and inclusion of this sentence (i.e. al-salaatu khayrun min al-nawm) in the Adhan for Fajr prayers by Sunnis? Is it comparable with what the Shiites are reciting and which has many narrations authenticating and confirming it?
 - Al-Sajdah: 4
 - Tabari Kiyaharasi, Abul Hasan Ali bin Muhammad, Ahkaamul Quran (Al-Kiyaharasi), vol.3, pg.83, Darul Kutub al-Ilmiyah, Beirut, 1405. A.H.
 - Fussilat: 34
 - Ibn Mazur, Muhammad bin Mukram, Lesan al-Arab, vol.15, pg.407, Dar Sadir, Beirut, 3rd edition, 1414 A.H.
 - Ibn Abi Hatam, Abdur Rahman bin Muhammad, Tafsir al-Quran al-Azim (Ibn Abi Hatam) vol.2, pg.675, published by Maktabat Nazar Mustafa al-Baz, 3rd edition, 1419 A.H.
 - Saduq, Man La-yahzuruhul Faqih, vol.1, pg.289-291, Jame'ah Mudarresin Publications, Qom, 1413 A.H.
 - Tauzihul Masail (with connotation), vol.1, pg.519, issue No.918.
 - Ibid.
 - Vide: The Third Testimony in Adhan, Iqamah and Prayers.
 - For further reading in this regard refer to the following indexes on this website: “Proving the Imamate of Imam Ali (a.s.), No.1162” and “Quran and Imamate of Imam Ali (a.s.) No.1817”