Ottoman period
The upper city of İzmir was captured from its Aydinid rulers by the Ottomans for the first time in 1389 during the reign of Bayezid I, who led his armies toward the five Western Anatolian Beyliks in the winter of the same year he had come to the throne. In 1402, however, Timur (Tamerlane) won the Battle of Ankara against the Ottomans, putting a serious check on the Ottoman state for the two following decades and handing back the territories of most of the Beyliks to their former ruling dynasties. Timur attacked and destroyed Smyrna and was responsible for the massacre of most of the Christian population, which constituted the vast majority in Smyrna. In 1415, Mehmet I took back İzmir for the Ottomans for the second time. With the death of the last bey of Aydın, İzmiroğlu Cüneyd Bey, in 1426 the city passed fully under Ottoman control. İzmir's first Ottoman governor was Alexander, a converted son of the Bulgarian Shishman dynasty. During the campaigns against Cüneyd, the Ottomans were assisted by the forces of the Knights Hospitaller who pressed the Sultan to return the port castle to them. However, the sultan refused to make this concession, despite the resulting tensions between the two camps, and he gave the Hospitallers permission to build a castle (the present-day Bodrum Castle) in Petronium (Bodrum) instead.
In a landward-looking arrangement somewhat against its nature, the city and its present-day dependencies became an Ottoman sanjak (sub-province) either inside the larger vilayet (province) of Aydın part of the eyalet of Anatolia, with its capital in Kütahya or in "Cezayir" (i.e. "Islands" referring to "the Aegean Islands"). In the 15th century, two notable events for the city were a surprise Venetian raid in 1475 and the arrival of Sephardic Jews from Spain after 1492; they later made İzmir one of their principal urban centers in Ottoman lands. İzmir may have been a rather sparsely populated place in the 15th and 16th centuries, as indicated by the first extant Ottoman records describing the town dating from 1528. In 1530, 304 adult males, both tax-paying and tax-exempt were on record, 42 of them Christians. There were five urban wards, one of these situated in the immediate vicinity of the port, rather active despite the town's small size and where the non-Muslim population was concentrated. By 1576, İzmir had grown to house 492 taxpayers in eight urban wards and had a number of dependent villages. This corresponded to a total population estimated between 3500 and 5000.
İzmir's remarkable growth began in the late 16th century when cotton and other products of the region brought French, English, Dutch and Venetian traders here. The emergence of İzmir as a major international port by the 17th century was largely a result of the attraction it exercised over foreigners and the city's European orientation. With the privileged trading conditions accorded to foreigners in 1620 (these were the infamous capitulations that were later to cause a serious threat and setback for the Ottoman state in its decline), İzmir began to be one of the foremost trade centers of the Empire. Foreign consulates moved from Chios to the city by the early 17th century (1619 for the French Consulate, 1621 for the British), serving as trade centers for their nations. Each consulate had its own quay, where the ships under their flag would anchor. The long campaign for the conquest of Crete (22 years between 1648 and 1669) also considerably enhanced İzmir's position within the Ottoman realm since the city served as a port of dispatch and supply for the troops. İzmir was also one of the few Ottoman port cities which had a maritime flag.
Despite facing a plague in 1676, an earthquake in 1688, and a great fire in 1743, the city continued to grow. By the end of the 17th century, the population was estimated at ninety thousand, the Turks forming the majority (about 60,000); there were also 15,000 Greeks, 8,000 Armenians and 6,000 to 7,000 Jews, as well as a considerable section made up of French, English, Dutch and Italian merchants. In the meantime, the Ottomans had allowed İzmir's inner bay dominated by the port castle to silt up progressively (the location of the present-day Kemeraltı bazaar zone) and the port castle ceased to be of use.
In 1770, the Ottoman fleet was destroyed by Russian forces at the Battle of Çeşme, located near the city. This triggered fanatical Muslim groups to proceed to the massacre of c. 1,500 local Greeks. Later, in 1797 a riot resulting from the indiscipline of janissaries corps led to massive destruction of the Frankish merchant community and the killing of 1,500 members of the city's Greek community. In 1818, traveller William Jowett described the distribution of Smyrna's population: Turks 60,000, Greeks 40,000, Jews 10,000, Latins 3,000, Armenians 7,000.
The first railway lines to be built within the present-day territory of Turkey went from İzmir. A 130 km (81 mi) İzmir-Aydın railway was started in 1856 and finished in 1867, a year later than the Smyrna-Cassaba Railway, itself started in 1863. In 1865 the population was estimated by the British (Hyde Clarke) at 180,000 with minorities of 80,000 Greeks, 8,000 Armenians and 10,000 Jews. The wide arc of the Smyrna-Cassaba line advancing in a wide arc to the north-west from İzmir, through the Karşıyaka suburb, contributed greatly to the development of the northern shores as urban areas. These new developments, typical of the industrial age and the way the city attracted merchants and middlemen gradually changed the demographic structure of the city, its culture and its Ottoman character. In 1867, İzmir finally became the center of its own vilayet, still called by neighboring Aydın's name but with its own administrative area covering a large part of Turkey's present-day Aegean Region.
In the late 19th century, the port was threatened by a build-up of silt in the gulf and an initiative, unique in the history of the Ottoman Empire, was undertaken in 1886. In order to redirect the silt, the bed of the Gediz River was redirected to its present-day northern course, so that it no longer flowed into the gulf. The beginning of the 20th century saw İzmir take on the look of a global metropolis with a cosmopolitan city center. According to the 1893 Ottoman census, more than half of the population was Turkish, with 133,800 Greeks, 9,200 Armenians, 17,200 Jews, and 54,600 foreign nationals. According to author Katherine Flemming, by 1919, Smyrna's 150,000 Greeks made up just under half of the population, outnumbering the Turks in the city two to one, while the American Consul General, George Horton, records 165,000 Turks, 150,000 Greeks, 25,000 Jews, 25,000 Armenians, and 20,000 foreigners (Italians, French, British, Americans). According to Henry Morgenthau and Trudy Ring, before World War I, the Greeks alone numbered 130,000, out of a total population of 250,000. Moreover, according to various scholars, prior to the war, the city hosted more Greeks than Athens, the capital of Greece. The Ottoman ruling class of that era referred to the city as Infidel Smyrna (Gavur İzmir) due to its strong Greek presence.