The basilica was modeled on the Constantinople Basilica of the Holy Apostles. At that time it was the main pilgrimage site of the Christian world. After the Arab invasion of the Byzantine Empire in 654-5, urban life began to center around the hill with the basilica. The temple was surrounded by walls, and a castle - a citadel - was built on the top of the hill. The invasion of the Seljuk Turks resulted in the transformation of the basilica into a mosque, and the tomb of Saint. John could only be accessed for a fee. After the invasion of Ayasoluk by the Mongol leader Tamerlane, the hill was destroyed and the basilica turned into rubble.