As the Ottoman Empire expanded into Europe in the late 14th century, Gjirokastra fell under their dominion and its lords were for a time vassals of the Sultans. It is believed that by 1420 Gjirokastra and Drino Valley became part of the Ottoman Empire. One member of the Zenebishi family led a body of men from the region under the Sultan Beyazid I (1389-1402) who was defeated by the Mongol Lord Tamerlane at the battle of Ankara in 1402. By 1419 the city was fully controlled by the Turks with 163 dwelling houses recorded in the tax records of 1431-32.
In the 16th and 17th-centuries the city’s role as the main centre of the Sanjak of Albania (Sanjaks were the main administrative units of the early Ottoman Empire) resulted in increased prosperity and, as a result, an expansion of the urban quarters. With 434 dwelling houses recorded in 1583, the city had more than doubled in size in the course of a century. This dramatic increase was also due to a general movement of population from the countryside to towns, and the growth continued even after the regional seat of government was moved to Delvinë at the time of Sultan Suleiman the Magnificent (1520-1566). Gjirokastra was still an administrative centre as the seat of a kadi (judge), and many of the dwelling houses and mosques that survive today date to this later period. The city’s population appears to have remained stable in the 18th and 19th-centuries.
In 1811, the city fell into the hands of Ali Pasha of Tepelenë. He enlarged the fortress and constructed a 12-km aqueduct, which brought drinking water from Sopot Mountain. The stone aqueduct was the subject of a painting by the famous British artist Edward Lear (see photo above) who travelled widely in the region. The, by now derelict, aqueduct was almost totally demolished in 1932, but in the Manalat Quarter a small section still stands, known locally as Ali Pasha’s Bridge or Manalat Bridge. After Ali Pasha was killed by the forces of the Sublime Porte (the Ottoman Sultan and his court), the city continued as an Ottoman administrative centre and as a trading centre for local products including: livestock, wool, flannel, dairy products, silk, and embroidery.
Gjirokastra has always been a patriotic city and it was at the forefront of efforts to promote Albanian national identity during the 19th-century. In 1880, the Assembly of Gjirokastra actively promoted the cause of self-government and resistance to Ottoman rule. In 1908, Gjirokastra first Albanian language school, named Liria, was opened in the city followed by a series of patriotic clubs and societies.

1912 and Independence

By the end of the first decade of the twentieth century, Ottoman power in the Balkans was in terminal decline. Seizing an opportunity for expansion, the newly independent nations of Greece, Bulgaria, Montenegro and Serbia fought two bloody conflicts – the Balkan wars – for control of the ailing Ottoman Empire’s former territories. Threatened with annexation, Albanians chose this moment to declare themselves an independent nation on November 28, 1912. At the first national assembly that gathered at Vlora, various distinguished representatives including Myfit Bej Libohova, Panajot Boga, and Hysen Hoxha—signed on behalf of the Gjirokastra region.

The first decades of the 20th century were difficult years for Gjirokastra as the border moved back and forth with neighboring Greece asserting territorial claims.