The one who most deserves to lead the prayer is the one who has most knowledge of the rulings on prayer and has memorized the most Qur’aan.
It was narrated that Abu Mas’ood al-Ansaari said: The Messenger of Allaah (peace and blessings of Allaah be upon him) said: “The people should be led in prayer by the one who has most knowledge of the Book of Allaah; if they are equal in knowledge of the Qur’aan, then by the one who has most knowledge of the Sunnah.”
Narrated by Imam Muslim, 1530.
What is meant by “the one who has most knowledge of the Qur’aan” is not the one who can recite it most beautifully, but rather the one who has memorized more of the Book of Allaah. This is indicated by the hadeeth of ‘Amr ibn Salamah who said: “I used to memorize those words – meaning the Qur’aan – and it was as if it took root in my heart. When Makkah was conquered, then every tribe hastened to embrace Islam, and my father urged our tribe to hasten to embrace Islam. When my father returned (from the Prophet) to his tribe, he said, ‘By Allah, I have come to you from the true Prophet (peace and blessings of Allaah be upon him)!’ The Prophet (peace and blessings of Allaah be upon him) afterwards said to them, ‘Offer such-and-such a prayer at such-and-such a time, and when the time for the prayer becomes due, then one of you should pronounce the Adhaan (for the prayer), and let the one amongst you who knows most Qur’aan lead the prayer.’ So they looked for such a person and found none who knew more Qur'an than I, because of what I used to learn from the people. So they made me their imam (to lead the prayer) and at that time I was a boy of six or seven years.”
(Narrated by al-Bukhaari, 4051)
We say that it is essential for the imam to know the rulings on prayer, because he may do something, such as not breaking his wudoo’, or missing out a rak’ah, and not know what to do about it, in which case he would make a mistake and cause the prayer of others to be imperfect or invalid altogether.
Based on the hadeeth quoted above, some of the scholars said that the one who has more knowledge of fiqh should lead the prayers.
Maalik, al-Shaafa’i and their companions said that the one who has more knowledge of fiqh should take precedence over the one who knows more Qur’aan, because what he needs of recitation is known but what he needs of fiqh may not be clear. There may arise during the prayer some matter where only a person who has complete knowledge of fiqh will be able to know the right thing to do. They said that this is the reason why the Prophet (peace and blessings of Allaah be upon him) told Abu Bakr (may Allaah be pleased with him) to lead the prayer rather than anyone else, even though he (peace and blessings of Allaah be upon him) had stated that others had more knowledge of Qur’aan than him. But some refuted this point by quoting the hadeeth that said that the Sahaabah who had most knowledge of Qur’aan were also those who had most knowledge of fiqh. But there is another hadeeth according to which the Prophet (peace and blessings of Allaah be upon him) said: “If they are equal in knowledge of Qur’aan, then the one who has most knowledge of the Sunnah,” which indicates that those who have most knowledge of Qur’aan should be given precedence in all cases.
Sharh Muslim, 5/177
Even though al-Nawawi differed with his imam al-Shaafa’i with regard to the interpretation of the hadeeth, their words illustrate the basic principle that there was no one among the Sahaabah who had a good knowledge of the Qur’aan but was ignorant of the rulings of sharee’ah, as is the case among many people nowadays.
Ibn Qudaamah said:
If one of them has more knowledge of the rulings on prayer, and the other has more knowledge of matters other than prayer, then the one who has more knowledge about prayer should be given precedence.
The Standing Committee said:
If this is understood, then it is not permissible for one who is ignorant to lead the prayer unless he is leading others like him, if there is no one who is better qualified to lead the prayer.
Fataawa Islamiyyah, 1/264
We do not understand what is meant in the question. The phrase “ill-Allaah” is not dhikr on its own, and it is not mentioned in any dhikr on its own. Rather it comes as part of another phrase, namely Laa ilaaha ill_Allaah wahdahu laa shareeka lah, lahu’l-mulk wa lahu’l-hamd was huwa ‘ala kulli shay’in qadeer (There is no god but Allaah alone, with no partner or associate; His is the Sovereignty and to Him be praise, and He is able to do all things). And it appears in many other dhikrs.
And Allaah knows best.