[Machine] We used to pray with the Prophet ﷺ during a journey or travel, and then a cloud overshadowed us and confused us in determining the direction of the qibla (direction of prayer). So, each of us prayed individually in a different direction. Then, each of us marked a spot in front of himself so that we could identify our positions. We mentioned this incident to the Prophet ﷺ, and he did not command us to repeat the prayers. He said, "Your prayers have been accepted."
كُنَّا نُصَلِّي مَعَ رَسُولِ اللَّهِ ﷺ فِي مَسِيرٍ أَوْ سَيْرٍ فَأَظَلَّنَا غَيْمٌ فَتَحَيَّرْنَا فَاخْتَلَفْنَا فِي الْقِبْلَةِ فَصَلَّى كُلُّ وَاحِدٍ مِنَّا عَلَى حِدَةٍ فَجَعَلَ كُلُّ وَاحِدٍ مِنَّا يَخُطُّ بَيْنَ يَدَيْهِ لِنَعْلَمَ أَمْكِنَتَنَا فَذَكَرْنَا ذَلِكَ لِلنَّبِيِّ ﷺ فَلَمْ يَأْمُرْنَا بِالْإِعَادَةِ وَقَالَ «قَدْ أَجْزَأَتْ صَلَاتُكُمْ»