before the imam, that Allah may transform his head into that of a donkey, or transform his form into that of a donkey?” (1) This proves that preceding the imam is prohibited. Likewise, regarding his statement, peace and blessings be upon him, “You must straighten your rows, or Allah will surely cause division among your hearts,” (2) we said that it supports the stronger view: that straightening the row is obligatory.
This hadith concerning raising one’s gaze toward the heaven is no less indicative than the Prophet’s statement, peace and blessings be upon him: “Does the one who raises his head before the imam not fear that Allah may transform his head into that of a donkey, or transform his form into that of a donkey?” Indeed, it may be more severe and emphatic: a person’s sight may return to him as blindness before it is restored to him.
As for the reasoning, it is because this entails poor etiquette before Allah Most High. The one praying stands before Allah, so he should conduct himself properly before Him and not raise his head; rather, he should be humble and submissive. For this reason, Amr ibn al-As, may Allah be pleased with him, said that before accepting Islam, he hated the Prophet, peace and blessings be upon him, intensely—so much so that he wished to overcome him and kill him. But when he accepted Islam, he said: “I could not bear to fill my eyes by looking at him, out of reverence for him; and if I were asked to describe him, I would not be able to.” (3)
Therefore, the stronger view is that raising one’s gaze toward the heaven in prayer is unlawful (4), not merely disliked. But if we say that it is unlawful, and then a person raises his gaze toward the heaven, does his prayer become invalid?