Narrated Bara’ bin `Azib: Allah’s Apostle prayed facing Baitul-Maqdis for sixteen or seventeen months but he loved to face the Ka`ba (at Mecca) so Allah revealed: “Verily, We have seen the turning of your face to the heaven!” (2:144) So the Prophet faced the Ka`ba and the fools amongst the people namely “the Jews” said, “What has turned them from their Qibla (Baitul-Maqdis) which they formerly observed”” (Allah revealed): “Say: ‘To Allah belongs the East and the West. He guides whom he will to a straight path’.” (2:142) A man prayed with the Prophet (facing the Ka`ba) and went out. He saw some of the Ansar praying the `Asr prayer with their faces towards Baitul-Maqdis, he said, “I bear witness that I prayed with Allah’s Apostle facing the Ka`ba.” So all the people turned their faces towards the Ka`ba.
Hadith In Arabic Text :
حدثنا عبد الله بن رجاء، قال حدثنا إسرائيل، عن أبي إسحاق، عن البراء بن عازب رضى الله عنهما قال كان رسول الله صلى الله عليه وسلم صلى نحو بيت المقدس ستة عشر أو سبعة عشر شهرا، وكان رسول الله صلى الله عليه وسلم يحب أن يوجه إلى الكعبة، فأنزل الله {قد نرى تقلب وجهك في السماء} فتوجه نحو الكعبة، وقال السفهاء من الناس وهم اليهود ما ولاهم عن قبلتهم التي كانوا عليها {قل لله المشرق والمغرب يهدي من يشاء إلى صراط مستقيم} فصلى مع النبي صلى الله عليه وسلم رجل ثم خرج بعد ما صلى، فمر على قوم من الأنصار في صلاة العصر نحو بيت المقدس فقال هو يشهد أنه صلى مع رسول الله صلى الله عليه وسلم، وأنه توجه نحو الكعبة. فتحرف القوم حتى توجهوا نحو الكعبة.
Chapter : Prayers (Salat) – كتاب الصلاة