remained behind became Christians and the main mosque was either torn down or turned into a stable. The city remained under Byzantine rule until 1085. It was thereafter disputed between Latin Crusaders, Byzantines (1137–1172), Seljuk Turks and the Armenians of the Armenian Kingdom of Cilicia (Kingdom of Lesser Armenia). The city was the capital of the Armenian Kingdom of Cilicia between 1080 and 1198. The Armenians became definitive masters until about 1359 when the city was captured by the Ramadanid Emirate and Mamluk Sultanate. Finally, the area was brought under the control of the Ottoman Empire by Selim I in 1516. In the Middle Ages, Tarsus was renowned throughout the Middle East; a number of Arab writers praised it as a beautiful and well-defended city, its walls having two layers of fortifications with five gates and earthworks outside, surrounded by rich farmland and watered by the river and the lake. Ottoman and modern period Under Ottoman rule, Tarsus initially formed part of the Eyalet of Aleppo. After the Ottoman conquest of Cyprus in 1571 it became the seat of a sanjak (sub-province) within the Cyprus Eyalet, before being transferred in 1608 to the sanjak of Adana as a kaza (district). Visiting in 1671 the traveller Evliya Çelebi recorded "a city on the plain, an hour from the sea, surrounded by strong walls two-storeys high, moated on all sides, with three distinct neighbourhoods inside the walls". Despite its excellent defences, Tarsus was captured from the Ottomans in 1832 by the Mamluks of Ibrahim Pasha of Egypt, son of Muhammad Ali, and remained for eight years in Egyptian hands. The Egyptians began growing cotton on the surrounding plain. Following the return of Ottoman rule this cotton drove substantial growth in the local economy, due to increased world demand for the crop during shortages caused by the U.S. Civil War. A new road was built to the port in Mersin and the city of Tarsus grew and thrived. Still today many large houses in the city stand as reminders of the wealth generated during this period. However, after 3,000 years as a flourishing port, by the end of the 19th century neglect Tarsus lost its access to the sea and the delta became a swamp. At this point it was a typical Ottoman city with communities of Muslim Turks, Christian Greeks and Armenians. With the founding of the Turkish Republic in the 1920s,