[Machine] The Messenger of Allah ﷺ prayed after he arrived in Medina for sixteen months, then Allah revealed a verse commanding him to turn his face towards the Kaaba. It said: "We have certainly seen the turning of your face, [O Muhammad], toward the heaven."
صَلَّى رَسُولُ اللهِ ﷺ بَعْدَ أَنْ قَدِمَ الْمَدِينَةَ إِلَى بَيْتِ الْمَقْدِسِ سِتَّةَ عَشَرَ شَهْرًا ثُمَّ أَنْزَلَ اللهُ آيَةً أَمَرَهُ بِالتَّحَوُّلِ إِلَى الْكَعْبَةِ فَقَالَ {قَدْ نَرَى تَقَلُّبَ وَجْهِكَ فِي السَّمَاءِ} الْآيَةَ