The Lefke Gate, part of Nicaea's city walls.
The place is said to have been colonized by Bottiaeans, and to have originally borne the name of Ancore (Ἀγκόρη) or Helicore (Ἑλικόρη), or by soldiers of Alexander the Great's army who hailed from Nicaea in Locris, near Thermopylae. The later version however was not widespread even in Antiquity. Whatever the truth, the first Greek colony on the site was probably destroyed by the Mysians, and it fell to Antigonus I Monophthalmus, one of Alexander's successors (Diadochi) to refound the city ca. 315 BC as Antigoneia (Ἀντιγονεία) after himself. Antigonus is also known to have established Bottiaean soldiers in the vicinity, lending credence to the tradition about the city's founding by Bottiaeans. Following Antigonus' defeat and death at the Battle of Ipsus in 301 BC, the city was captured by Lysimachus, who renamed it Nicaea (Νίκαια, also transliterated as Nikaia or Nicæa; see also List of traditional Greek place names), in tribute to his wife Nicaea, who had recently died.
Sometime before 280 BC, the city came under the control of the local dynasty of the kings of Bithynia. This marks the beginning of its rise to prominence as a seat of the royal court, as well as of its rivalry with Nicomedia. The two cities' dispute over which one was the pre-eminent city (signified by the appellation metropolis) of Bithynia continued for centuries, and the 38th oration of Dio Chrysostom was expressly composed to settle the dispute.
Along with the rest of Bithynia, Nicaea came under the rule of the Roman Republic in 72 BC. The city remained one of the most important urban centres of Asia Minor throughout the Roman period, and continued its old competition with Nicomedia over pre-eminence and the location of the seat of the Roman governor of Bithynia et Pontus. The geographer Strabo (XII.565 ff.) described the city as built in the typical Hellenistic fashion with great regularity, in the form of a square, measuring 16 stadia in circumference, i.e. approx. 700 m × 700 m (2,297 ft × 2,297 ft) or 0.7 km × 0.7 km (0.43 mi × 0.43 mi) covering an area of some 50 ha (124 acres) or 0.5 km2 (0.2 sq mi); it had four gates, and all its streets intersected one another at right angles in accordance with the Hippodamian plan, so that from a monument in the centre all the four gates could be seen. This monument stood in the gymnasium, which was destroyed by fire but was restored with increased magnificence by Pliny the Younger, when he was governor there in the early 2nd century AD. In his writings Pliny makes frequent mention of Nicaea and its public buildings.
Emperor Hadrian visited the city in 123 AD after it had been severely damaged by an earthquake and began to rebuild it. The new city was enclosed by a polygonal wall of some 5 kilometres in length. Reconstruction was not completed until the 3rd century, and the new set of walls failed to save Nicaea from being sacked by the Goths in 258 AD. The numerous coins of Nicaea which still exist attest the interest taken in the city by the Roman emperors, as well as its attachment to the rulers; many of them commemorate great festivals celebrated there in honour of gods and emperors, as Olympia, Isthmia, Dionysia, Pythia, Commodia, Severia, Philadelphia, etc.
By the 4th century, Nicaea was a large and prosperous city, and a major military and administrative centre. Emperor Constantine the Great convened the First Ecumenical Council there, and the city gave its name to the Nicene Creed. The city remained important in the 4th century, seeing the proclamation of Emperor Valens (364) and the failed rebellion of Procopius (365). During the same period, the See of Nicaea became independent of Nicomedia and was raised to the status of a metropolitan bishopric. However, the city was hit by two major earthquakes in 363 and 368, and coupled with competition from the newly established capital of the Eastern Empire, Constantinople, it began to decline thereafter. Many of its grand civic buildings began to fall into ruin, and had to be restored in the 6th century by Emperor Justinian I.
The city disappears from sources thereafter and is mentioned again in the early 8th century: in 715, the deposed emperor Anastasios II fled there, and the city successfully resisted attacks by the Umayyad Caliphate in 716 and 727. The city was again damaged by an earthquake in 740, served as the base of the rebellion of Artabasdos in 741/2, and served as the meeting-place of the Seventh Ecumenical Council, which condemned Byzantine Iconoclasm, in 787 (the council probably met in the basilica of Hagia Sophia). Nicaea became the capital of the Opsician Theme in the 8th century and remained "a center of administration and trade" (C. Foss). A Jewish community is attested in the city in the 10th century. Due to its proximity to Constantinople, the city was contested in the rebellions of the 10th and 11th centuries as a base from which to threaten the capital. It was in the wake of such a rebellion, that of Nikephoros Melissenos, that it fell into the hands of Melissenos' Turkish allies in 1081. The Seljuk Turks made Nicaea the capital of their possessions in Asia Minor until 1097, when it returned to Byzantine control with the aid of the First Crusade after a long siege.
The 12th century saw a period of relative stability and prosperity at Nicaea. The Komnenian emperors Alexios, John and Manuel campaigned extensively to strengthen the Byzantine presence in Asia Minor. Major fortifications were constructed across the region, especially by John and Manuel, which helped to protect the city and its fertile hinterland. There were also several military bases and colonies in the area, for example the one at Rhyndakos in Bithynia, where the emperor John spent a year training his troops in preparation for campaigns in southern Asia Minor.
After the fall of Constantinople to the Fourth Crusade in 1204, and the establishment of the Latin Empire, Nicaea escaped Latin occupation and maintained an autonomous stance. From 1206 on, it became the base of Theodore Laskaris, who in 1208 was crowned emperor there and founded the Empire of Nicaea. The Patriarchate of Constantinople, exiled from Constantinople, also took up residence in the city until the recapture of Constantinople in 1261. Although Nicaea was soon abandoned as the primary residence of the Nicaean emperors, who favoured Nymphaion and Magnesia on the Maeander, the period was a lively one in the city's history, with "frequent synods, embassies, and imperial weddings and funerals", while the influx of scholars from other parts of the Greek world made it a centre of learning as well.
After the restoration of the Byzantine Empire in 1261, the city once again declined in importance. The neglect of the Asian frontier by Michael VIII Palaiologos provoked a major uprising in 1262, and in 1265, panic broke out when rumours circulated of an imminent Mongol attack. Emperor Andronikos II Palaiologos visited the city in 1290 and took care to restore its defences, but Byzantium proved unable to halt the rise of the nascent Ottoman emirate in the region. After Emperor Andronikos III Palaiologos and John Kantakouzenos were defeated at Pelekanon on 11 June 1329, the Byzantine government could no longer defend Nicaea. Nicaea finally surrendered to the Ottomans after a long siege 2 March 1331.
In 1331, the city was conquered and incorporated into the Ottoman Empire by Orhan I. Many of its public buildings were destroyed, and the materials were used by the Ottomans in erecting their mosques and other edifices. With the fall of Constantinople in 1453, the town lost a great degree of its importance, but later became a major centre with the creation of a local faïence pottery-making industry in the 17th century.