been behind them; they simply brought it in front of themselves, turned around, and remained in their prayer. This took place during the lifetime of the Prophet—may Allah bless him and grant him peace—and he raised no objection to it, which means the practice is sanctioned. Therefore, if someone faces the wrong direction out of ignorance, he is not required to repeat the prayer. However, if it becomes clear to him—even in the middle of the prayer—he must correct himself and face the qiblah. Should another person come and tell him, “The qiblah is to your right,” or “to your left,” he must pivot accordingly without starting over, for his initial orientation was based on personal effort and a legitimate methodology, so the act is not invalidated.
Facing the qiblah is one of the conditions for the validity of prayer; the prayer is not sound without it except in the three situations we have mentioned, or when someone errs after diligent inquiry and careful effort.
Here is another point: if you are a guest in someone’s home and wish to offer a voluntary prayer, you must ask the host about the qiblah. Once he informs you, face it. Some people are overcome by wrongful pride, or by shyness that is out of place, and refuse to ask. They are embarrassed lest others say, “He doesn’t even know!” Such remarks are of no consequence—let people say what they will—rather, ask about the qiblah until the homeowner clarifies it for you.
At times, a person—out of sinful pride or misplaced modesty—chooses a direction merely on the basis of conjecture, only to realize later that it is not the qiblah. In that case he must repeat the prayer, because he relied on no legitimate evidence. Any act of worship that rests on something other than a sound legal foundation will not be accepted, for the Prophet—may Allah bless him and grant him peace—said: “Whoever…"