The Crusaders constructed several Crusader castles as part of the Lordship of Oultrejordain, including those of Montreal and Al-Karak. The Ayyubids built the Ajloun Castle and rebuilt older castles, to be used as military outposts against the Crusaders. During the Battle of Hattin (1187) near Lake Tiberias just north of Transjordan, the Crusaders lost to Saladin, the founder of the Ayyubid dynasty (1187–1260). Villages in Transjordan under the Ayyubids became important stops for Muslim pilgrims going to Mecca who travelled along the route that connected Syria to the Hejaz. Several of the Ayyubid castles were used and expanded by the Mamluks (1260–1516), who divided Transjordan between the provinces of Karak and Damascus. During the next century Transjordan experienced Mongol attacks, but the Mongols were ultimately repelled by the Mamluks after the Battle of Ain Jalut (1260).