Learning after the prayer that the direction was wrong
Question
After praying, it became known that the prayer had been performed in the wrong direction. Will the prayer be valid?
Answer
If there was no one to indicate the direction of the qibla, and it could not be learned from a mosque either, and he prayed after making taharri (an effort to determine the direction), then the prayer is valid.
Source: Fatawa Mahmudiyya
Preview. The full text opens with JavaScript enabled.