It is narrated from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) used to pray in Makkah facing Bayt al-Maqdis (Jerusalem), while the Ka'bah was in front of him (peace and blessings be upon him), and also for sixteen months after he emigrated to Madinah (he continued to pray in this way); then he (peace and blessings be upon him) was turned towards the Ka'bah.