Hagia Sophia is a former Greek Orthodox patriarchal basilica (church), later an imperial mosque, and now a museum (Ayasofya Müzesi) in Istanbul, Turkey.