 Complete the following phrase:  Tancred, Prince of Galilee, took it in 1108, but in 1114 the Crusaders lost it definitively to the Seljuks, during the reign of Toghtekin, atabeg of Damascus. The governor of Hama in the early 12th century was Ali Kurd, and his sons, Nasir and Kurdanshah became vassals of Toghtekin. In 1157 an earthquake shattered the city. For the next sixty years, Hama was battled for by competing rulers. Nur al-Din, the Zengid sultan, erected a mosque with a tall, square minaret in the city in 1172. In 1175, Hama was taken from the Zengids by Saladin. He granted the city to his nephew, al-Muzaffar Umar, four years later, putting it under the rule of his Ayyubid family. This ushered in an era of stability and prosperity in Hama as the Ayyubids ruled it almost continuously until 1342. Geographer Yaqut al-Hamawi, who was born in Hama, described it in 1225 as a large town surrounded by a strongly built wall. Hama was sacked by the Mongols in 1260, as were most other Syrian cities, but the Mongols were 