Nicomedia (modern İzmit, Turkey) was a city of Bithynia, the residence of Diocletian and his successors until 330. The foundation of Constantinople brought decline, but Nikomedeia remained a provincial capital and seat of a philosophical school headed by Libanios. Ruined by the earthquake of 358, Nicomedia never really recovered, though Justinian I restored some public buildings and the highway eastward. The vita of St. Theodore of Sykeon reveals many details of local topography and economy; Nicomedia had a group of influential scholarii, a weapons factory (founded by Diocletian), a poorhouse, and numerous churches and monasteries.
Its location on the main road to the capital made Nicomedia a major military base: it played a role in the campaigns of Heraclius, Justinian II, Leo III, and Artabasdos and was defended against Arabs and Paulicians. As a commercial center Nicomedia was headquarters of kommerkiarioi in the 8th-9th century. Its bishop Theophylaktos (c. 800-15) built a complex of poorhouse and monastery, and an imperial xenodocheion was established by the 9th century. Nikomedeia became the capital of Optimatoi but was described by Ibn Khordadbeh as ruined, no doubt because the huge ancient city by the harbor had been abandoned as Nicomedia withdrew to a defensible hilltop.
As the Turks advanced toward Constantinople after their capture of Nicaea in 1081, Nicomedia was the base for Alexios I's attempts to retain control of the coastal regions. The First and Second Crusades both stopped there; Odo of Deuil described it as a city whose lofty ruins were overgrown with thorns and brambles. Nicomedia saw much fighting after 1204. At first it was controlled by Theodore I Laskaris, who defeated David Komnenos of Trebizond nearby; by 1206, however, the city fell to the Latins, who, finding its walls in ruins, fortified the Church of Hagia Sophia as their main castle. A treaty of 1207 returned Nicomedia to Theodore and its fortifications were demolished, but the Latins regained it and held it until around 1240. Nicomedia was exposed to the attacks of Osman, who inflicted a severe defeat on the Byzantine at nearby Bapheus in 1302; after that, the agricultural population took refuge within the walls and the Turkomans ravaged the district. In 1304 and 1330, Nicomedia was blockaded and threatened by starvation; on the latter occasion John VI Kantakouzenos rescued it with his fleet. The city finally fell to Orhan in 1337.
Nicomedia preserves much of its fortifications, the long city walls of Diocletian, and the medieval hilltop fortress, which appears to be of the 12th-14th century. As a metropolitan bishopric Nicomedia played a major role under Eusebius OF Nicomedia, but later yielded in importance to Nicaea.