What is required if an individual realizes they were facing the wrong direction (Qibla) during prayer?
Chapter on Facing the Qiblah
Al-Mughni
Book of Prayer
Primary text
If certainty of error in the direction of prayer is established while performing the prayer, the worshipper must turn towards the Ka'bah and continue the prayer from that point. The preceding portion of the prayer remains valid and building upon it is permissible, just as if no error had occurred. If a group was led by an Imam based on their collective Ijtihad (independent reasoning) regarding the direction, and later the correct direction becomes apparent, they all turn towards the verified correct direction, as evidenced by the incident concerning the transformation of the Ka'bah's direction for Banu Salamah. If the error is realized only by the Imam, or only by the followers, or only by some of them, then only those who realize the correctness turn towards it. Some of them must nullify their following of others unless the situation permits following someone whose Ijtihad differs from their own.
Supporting text
If there is an individual in the group who is a Muqallid (one who follows another's ruling), they must follow the person they are imitating and shift direction accordingly. If everyone is a Muqallid, no shift occurs unless everyone shifts, because establishing the direction is based on a definitive proof, and doubt does not overturn it unless it is incumbent upon them to follow the most trustworthy among them, in which case they follow that person's deviation.