During the early 20th-century Gjirokastra occupied an important location as the frontiers of modern Albania were being defined. For a period following the collapse of Ottoman power and the declaration of Albanian Independence in 1912, it was part of the Autonomous Republic of Epirus under General Zographos who agitated for union with Greece, but after World War I the Entente powers (Britain, France and Russia) persuaded Greece to drop its claim to this majority ethnic Albanian area. The present frontier was ratified internationally in 1921.
During King Zog’s reign (1928-1939), Gjirokastra established itself as one of the most important cultural and economic centers in the country, although it was also known for the large prison constructed in the castle during Zog’s reign. The city fell under Italian occupation after their invasion of Albania in 1939, but it remained a centre of resistance to the Italian and later German occupation. Much of the region was liberated in 1944 by the partisans and was used as a base for the liberation of the rest of the country in November 1944.