Bukhari :: Book 1 :: Volume 8 :: Hadith 391
Narrated Ibn Abbas:
When the Prophet entered the Ka'ba, he invoked Allah in each and every side of it and did not pray till he came out of it, and offered a two-Rak'at prayer facing the Ka'ba and said, "This is the Qibla."
Source materials are from the University of Southern California MSA site|
Hadith eBooks converted from Imaan Star