The saying of the Exalted: "And to Allah belong the East and the West."
Muhammad said: The meaning is: He is their Creator. "So wherever you turn, there is the Face of Allah." Some said: It means: there is the Qiblah (direction of prayer) of Allah.
Yahya [narrated] from Ash'ath, from Asim ibn Ubayd Allah al-Umari, from Abd Allah ibn Amir ibn Rabi'ah, from his father, "that the Messenger of Allah (ﷺ) was on a journey and they stopped at a campsite on a dark night. One of them began collecting pebbles and made them into a mosque to pray. When they reached the morning, they realized they had been facing other than the Qiblah, so Allah (Glorified and Exalted is He) revealed: 'And to Allah belong the East and the West' [up to the end of] the verse."
قَوْله تَعَالَى: ﴿وَلِلَّهِ الْمَشْرِقُ وَالْمَغْرِبُ﴾.
قَالَ مُحَمَّد: الْمَعْنى هُوَ: خالقهما ﴿فَأَيْنَمَا تُوَلُّوا فَثَمَّ وَجْهُ اللَّهِ﴾ قَالَ بَعضهم: يَعْنِي: فثم قبْلَة اللَّه.
يَحْيَى: عَنْ أَشْعَثَ، عَنْ عَاصِم بن عبيد اللَّهِ الْعُمَرِيِّ، عَنْ عَبْدِ اللَّهِ بْنِ عَامِرِ بْنِ رَبِيعَةَ، عَنْ أَبِيهِ ((أَنَّ رَسُولَ اللَّهِ ﷺ [كَانَ] فِي سَفَرٍ فَنَزَلُوا مَنْزِلا فِي لَيْلَةٍ ظَلْمَاءَ، فَجَعَلَ أَحَدُهُمْ يَجْمَعُ الْحَصْبَاءَ، فَيَجْعَلُهَا مَسْجِدًا فَيُصَلِّي، فَلَمَّا أَصْبَحُوا؛ إِذَا هُمْ لِغَيْرِ الْقِبْلَةِ، فَأَنْزَلَ اللَّهُ ﷿ ﴿وَلِلَّهِ الْمَشْرِقُ وَالْمغْرب﴾ الْآيَة)).