The only people excused from facing the Kaʿbah are those who are physically incapable of doing so—such as someone who is tied up or crucified facing another direction and cannot move. In that case he prays as best he can, even though he is not oriented toward the qiblah, for this requirement is waived for him by unanimous agreement of the scholars. The same concession applies in the heat of battle, to a person fleeing a flood, a fire, a wild animal, or an enemy, and to the sick person who lacks the strength to turn toward the qiblah. All of them pray in whatever manner their circumstances allow, even if it is toward another direction, and their prayer is valid, because they are excused from a condition they cannot fulfil. Allah says, “So fear Allah as much as you are able” (64:16), and the Prophet said, “When I command you to do something, carry out of it whatever you are able.” An agreed-upon report likewise states that in times of extreme fear people may pray whether or not they are facing the qiblah.
The qiblah can be identified in many ways. One of them is trustworthy information: if a legally accountable, reliable, and upright person who is certain of the direction informs someone of it, he may rely on that report. The same holds true when one finds established Islamic mihrabs; their continuous use by worshippers is evidence that they are correctly aligned. Another method is to consult the stars, for Allah says, “And by the stars they are guided” (16:16).