In 629 AD, during the Battle of Mu'tah in what is today Al-Karak, the Byzantines and their Arab Christian clients, the Ghassanids, staved off an attack by a Muslim Rashidun force that marched northwards towards the Levant from the Hejaz (in modern-day Saudi Arabia). The Byzantines however were defeated by the Muslims in 636 AD at the decisive Battle of Yarmouk just north of Transjordan. Transjordan was an essential territory for the conquest of Damascus. The first, or Rashidun, caliphate was followed by that of the Ummayads (661–750). Under the Umayyad Caliphate, several desert castles were constructed in Transjordan, including: Qasr Al-Mshatta and Qasr Al-Hallabat. The Abbasid Caliphate's campaign to take over the Umayyad's began in Transjordan. A powerful 749 AD earthquake is thought to have contributed to the Umayyads defeat to the Abbasids, who moved the caliphate's capital from Damascus to Baghdad. During Abbasid rule (750–969), several Arab tribes moved northwards and settled in the Levant. As had happened during the Roman era, growth of maritime trade diminished Transjordan's central position, and the area became increasingly impoverished. After the decline of the Abbasids, Transjordan was ruled by the Fatimid Caliphate (969–1070), then by the Crusader Kingdom of Jerusalem (1115–1187).