What is the ruling if a person recites the Quran during prayer with the specific intention of alerting another person (e.g., asking permission or addressing someone by name mentioned in the Quran)?
Chapter on the Two Prostrations of Forgetfulness
Al-Mughni
Book of Prayer
Primary text
If a person recites the Quran during prayer with the intention of alerting a human being—such as saying '{Adkhuluha bi-salam}' (Quran 15:46) to request entry, or addressing someone named Yahya with '{Ya Yahya khudh al-kitaba bi-quwwah}' (Quran 19:12)—the prayer is invalidated according to a narration from Ahmad and the Madhhab of Abu Hanifa, because it resembles addressing a human being, akin to speaking directly. However, evidence suggests the prayer is not invalidated, referencing the Prophet's (peace be upon him) response to the Kharijite using Quranic verses, and narrations from Ibn Mas'ud and Ibn Abi Layla, including that of 'Abd al-Rahman ibn Abi Layla responding to a request for entry by reciting '{Adkhulu Misra in sha Allah a'mineen}' (Quran 12:99) while praying. The rationale is that reciting the Quran itself should not invalidate the prayer, just as it does not when the intention is recitation only.
Supporting text
Al-Qadi stated that if the intent is recitation without alerting, the prayer is not nullified. If the intent is alerting without recitation, the prayer is nullified due to addressing a human. If both intentions are present, there are two views: one, it is not nullified (the view of Al-Shafi'i, based on the narrations and rationale provided); the second, it is nullified because it involves addressing a human. Furthermore, if the utterance cannot be distinguished from ordinary speech (like saying 'Ya Ibrahim' to a person named Ibrahim), the prayer is nullified because it resembles mixed, non-Quranic speech.