sentences:  Close to the building, Seyhülislam Molla Hüsrev Mehmet Effendi (died 1480) established a "vakıf" (foundation) and erected a small mosque ("Küçük Mustafa Paşa Mescidi") and a bath ("Küçük Mustafa Paşa Hamamı"), which still exists.Some years later (in 1490), the ruined church was repaired and converted into a mosque.A minaret was erected between 1566 and 1574, under Selim II, by Hassam Pasha, a supplier of the Ottoman navy.