It was narrated that Ibn ‘Umar said: “While the people were in Quba’, praying ub prayer, someone came to them and said that Revelation had come to the Messenger of Allah صلی اللہ علیہ وآلہ وسلم the night before, and he had been commanded to face the Ka’bah. So face toward it. They had been facing toward Ash-Sham, so they turned to face toward the Ka’bah.” (Sahih)