Question: what kind of church is the hagia sophia
Answer: Hagia Sophia ( / ˈhɑːɡiə soʊˈfiːə / ; from the Greek : Αγία Σοφία , pronounced ( aˈʝia soˈfia ) , `` Holy Wisdom '' ; Latin : Sancta Sophia or Sancta Sapientia ; Turkish : Ayasofya ) was a Greek Orthodox Christian patriarchal basilica ( church ) , later an imperial mosque , and is now a museum ( Ayasofya Müzesi ) in Istanbul , Turkey .