later , in the fifteenth century , following the conquest of constantinople by fatih sultan mehmed , it had become a mosque , remaining an islamic house of worship until 1935 , when the building was secularized and became a museum .