Byzantine Iconoclasm
The first church built on the site of Hagia Sophia at İznik was constructed in the 4th century. It was later rebuilt under the patronage of Emperor Justinian I in the mid-6th century. In 787, the church hosted the Second Council of Nicaea, which officially ended the first period of Byzantine Iconoclasm. The Justinianic church was destroyed by an earthquake in the 11th century and the present structure was erected around 1065 over the ruins of the earlier structure.