It is narrated from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that the Prophet (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 the emigration (he continued to pray in this way); then he (peace and blessings be upon him) was turned towards the Ka'bah.