When the Messenger of Allaah (sallallaahu 'alaihi wa sallam) stood for prayer, he would face the Ka'bah in both obligatory and voluntary prayers [1], and he (sallallaahu 'alaihi wa sallam) ordered that, saying to the "one who prayed badly" [2] : When you stand for prayer, perform ablution prefectly, then face the qiblah and say takbeer. [3]
Jaabir (radiallaahu 'anhu) said: "Once, when we were with the Messenger of Allaah (sallallaahu 'alaihi wa sallam) on an expedition, the sky was cloudy, so we tried to find the Qibla but we differed, so each one of us prayed in a different direction, and each of us drew marks in front of him in order to mark our positions.
In the morning, we looked at it and found that we had not prayed towards the Qiblah. So we mentioned this to the Prophet (sallallaahu 'alaihi wa sallam) [but he did not order us to repeat (the prayer)] and he said: Your prayer was sufficient."12
"He (sallallaahu 'alaihi wa sallam) used to pray towards Bait al-Muqaddas [with the Ka'bah in front of him] before the following verse was revealed: "We see the turning of your faces to the heavens; now shall we turn you to a Qiblah that shall please you: turn then your faces in the direction of the Sacred Mosque" (Baqarah 2:144).
When it was revealed he faced the Ka'bah. There were people at Qubaa' praying Fajr when someone came to them and said, 'Verily the Messenger of Allaah
(sallallaahu 'alaihi wa sallam) has had some of the Qur'aan revealed to him last night and he has been ordered to face the Ka'bah, [verily] so face it'. Their faces were towards Shaam, so they turned round [and their Imaam turned round to face the qiblah along with them]."13
He used to forbid prayer facing the grave, saying: Do not pray towards the graves, and do not sit on them.57