Crusader rule came to an end in 1187, when the Ayyubids led by Saladin captured the city. According to a liturgical manuscript in Syriac, Latin Christians fled Nablus, but the original Eastern Orthodox Christian inhabitants remained. Syrian geographer Yaqut al-Hamawi (1179–1229), wrote that Ayyubid Nablus was a "celebrated city in Filastin (Palestine)... having wide lands and a fine district." He also mentions the large Samaritan population in the city. After its recapture by the Muslims, the Great Mosque of Nablus, which had become a church under Crusader rule, was restored as a mosque by the Ayyubids, who also built a mausoleum in the old city.