Ruling on doubting the intention (niyyah) during prayer?
Chapter on the Description of Prayer
Al-Mughni
Book of Prayer
Primary text
If one doubts during the prayer whether they made the intention or not, or if they doubt the initial Takbiratul Ihram (opening takbir), the prayer must be restarted. This is because the default state is the absence of the thing doubted. However, if one remembers that they had indeed made the intention or uttered the Takbir before they interrupted it or proceeded to another action, they may continue the prayer based on that established action, as no nullifying factor has occurred.
Supporting text
If one performs an action within the prayer while in a state of doubt regarding the intention, the view held by Al-Qadi (and the position of the Shafi'i school) is that the prayer becomes invalid because this action lacks the intention and its ruling, and maintaining the ruling of the intention while doubting is impermissible. Ibn Hamid contends that the prayer does not become invalid, and one may proceed, because doubt does not remove the ruling of the intention, evidenced by the permissibility of proceeding if no action was performed after the doubt. If the ruling of the intention were removed, the prayer would be invalidated, similar to if one had intended to terminate the prayer.