 Emir Sanjar al @-@ Jawli acquired the governorship of Gaza and central Palestine in 1311 . He highly favored Gaza and transformed it into a flourishing city , having built in it a horse @-@ race course , a madrasa ( college ) , a mosque , a khan ( caravansary ) , a maristan ( hospital ) , and a castle . In late 1332 , coinciding with the appointment of Emir Taynal al @-@ Ashrafi as governor , some of the provincial privileges of Gaza , such as the governor 's direct subordination to the sultan in Cairo , were removed by an @-@ Nasir Muhammad 's decree . From then , and until 1341 when Sanjar al @-@ Jawli served a second term as governor , Gaza became subordinate to the na 'ib as @-@ saltana ( viceroy ) of Syria , Emir Tankiz al @-@ Husami . 
