[Machine] A man came while the Prophet ﷺ was praying and heard the sound of his footsteps. When he finished, he asked, "Who entered?" The man replied, "It was me, O Messenger of Allah." The Prophet asked, "And how did you find us?" The man replied, "I found you in prostration, so I also prostrated." The Prophet said, "This is what you should do if you find me standing, bowing, prostrating, or sitting. Do as you find me, and do not initiate the prostration if you have not caught the rak'ah (unit of prayer)."
جَاءَ رَجُلٌ وَالنَّبِيُّ ﷺ يُصَلِّي فَسَمِعَ خَفْقَ نَعْلَيْهِ فَلَمَّا انْصَرَفَ قَالَ أَيُّكُمْ دَخَلَ؟ قَالَ الرَّجُلُ أَنَا يَا رَسُولَ اللهِ قَالَ وَكَيْفَ وَجَدْتَنَا؟ قَالَ سُجُودًا فَسَجَدَتُ قَالَ هَكَذَا فَافْعَلُوا إِذَا وَجَدْتُمُوهُ قَائِمًا أَوْ رَاكِعًا أَوْ سَاجِدًا أَوْ جَالِسًا فَافْعَلُوا كَمَا تَجِدُونَهُ وَلَا تَعْتَدُّوا بِالسَّجْدَةِ إِذَا لَمْ تُدْرِكُوا الرَّكْعَةَ