History of Ganja

Eurasia.Travel > Azerbaijan > Ganja > History of Ganja

History of Ganja

Gates of GanjaGates of Ganja

The history of Ganja is long, tumultuous, and marked by significant bloodshed reminiscent of ancient Iranian conflicts. According to one account, the city, known as Janza in Arabic, was established in 659 AD, serving as a supply base for Arab forces during their conquest of the Caucasus. Another version attributes the founding of Ganja, or Gandzak, to Muhammad ibn Khalid, a Shirvanshah from the Mazdiyad dynasty, in 859 AD in Shemakha. Regardless of its origins, Ganja flourished in the aftermath of the Caliphate’s decline.

In 951 AD, the city of Dvin, located in present-day Armenia and the residence of the Arab governor of the Caucasus, was captured by Kurds led by Muhammad ibn Shaddad. By 970 AD, his son Fazl had taken control of Ganja, ostensibly to protect Arran from mountain tribes, and proclaimed the Ganja Emirate, which was linked to two other emirates of the Shaddad dynasty—Dvin and Ani. However, the Ganja Kurds soon faced a formidable adversary in Georgia, which consistently triumphed in border conflicts. Even more pressure emerged in 1054 AD when the Seljuk Turks, arriving from across the Caspian Sea, became the new rulers of the Caucasus. The Shaddadids found themselves acknowledging the Seljuks as their overlords multiple times, only for the agreement to be broken, leading to Seljuk incursions into the city. This cycle repeated until 1086, when the Seljuk Sultan decided to put an end to the Shaddadid presence, capturing and deposing the local emir, Fadlun III. Interestingly, it was primarily the monarchs and peasants who suffered during these upheavals, while the city itself continued to rebuild and prosper, eventually becoming a central hub of life in the Caucasus by the early 12th century.

A significant blow came not from the east or west, but from below: on September 30, 1139, Ganja was devastated by one of the most powerful earthquakes in the history of the Caucasus, estimated at an intensity of 11 on the Richter scale. The death toll was catastrophic, with around 230,000 lives lost (equivalent to millions today), and the surrounding mountains were transformed, creating numerous lakes, including the famous Goygol, formed from landslide damming. The remnants of the city were immediately looted by the Georgians under King Demetre I, and the spoils from that era can still be found in various monasteries and museums across Georgia.

However, a city strategically located cannot be erased from the face of the Earth by disaster or war. Ganja was soon reclaimed by the Ildegizids, a new Azerbaijani monarchy. Their domain attracted officials, merchants, and craftsmen, including Yusuf ibn Zaki from Qum, whose son would later be immortalized as the poet Nizami Ganjavi. Other notable figures from Ganja’s history include the poetess Mehsati, and after rebuilding from the earthquake, Ganja entered its golden age. Even the Mongols could not extinguish this flourishing period, as their invasions reached Ganja in two waves. In 1225, Jalal ad-Din Manguberdi, the last Khwarezmshah, captured Ganja, managing to rally the remnants of his father’s army and inflict a rare tactical defeat on Genghis Khan himself. The “Scourge of the Universe” did not take this lightly; in the subsequent conflict, Genghis Khan emerged victorious, forcing Jalal ad-Din to flee westward, where he further dismantled the Ildegizid emirate. However, a battered army is not the best administrator, and Manguberdi found himself waging war on two fronts against the Mongols and Seljuks.

ruins of Ganja fortress
ruins of Ganja fortress

In 1231, a peasant revolt erupted in Ganja, led by a Christian craftsman named Bender. Although the uprising was quelled and its leader executed, the Khwarezmshah’s regime could not withstand the ensuing chaos. After suffering additional defeats, Manguberdi fled further west through the mountains, ultimately falling victim to a Kurdish bandit’s dagger. By 1235, the Mongols themselves arrived at Ganja’s gates. According to legend, the war-weary residents, realizing they could neither fight nor bribe this enemy, locked themselves in their homes and set the city ablaze. Yet, Ganja survived this calamity, remaining an important regional center throughout the ensuing dark centuries. Under the Safavid dynasty in the 16th century, which transformed Iran into a Shia empire, Ganja became the residence of the Karabakh beglarbegi (governor).

From 1588 to 1606, the Turks occupied Ganja, constructing a new fortress away from the urban quarters across the Ganjachay River. This event marked a pivotal moment in the city’s history, as all previously mentioned events pertain to Old Ganja, which now lies on the outskirts surrounded by industrial zones. After reclaiming the city, Shah Abbas I resettled the inhabitants under the protection of Turkish walls, leading to the establishment of New Ganja on the map of his dominions in 1616.

Unlike many other regions of Azerbaijan, Ganja remained loyal to Persia through its various upheavals, only falling under Turkish control through military force during the Ottoman occupation from 1723 to 1726.

It wasn’t until 1747, amid the rise of new Azerbaijani khanates, that the local beglarbegis, Ziyad-oglu from the Qajar tribe (the same tribe that ruled in Erivan), declared the establishment of the Ganja Khanate. This “City of Treasures” held a significant advantage over its neighbors, as it possessed a mint established during the Safavid era. Silk became the primary export commodity, and Shahverdi Khan, along with his descendants, vied for supremacy in the Caucasus against rivals from Shusha, Sheki, and Shemakha. As the Ziyadids were a branch of the Qajars, in 1796, when Agha Muhammad Qajar from Mazandaran seized the Persian throne, the local Djaavad Khan reaffirmed his loyalty to the Shah. During the ensuing Russo-Persian Wars, Ganja, like Erivan, became an integral part of the Persian domain. Unlike Guba, Baku, or Sheki, there were no attempts at pacification here; in 1804, after a three-month siege, the Russian army under Pavel Tsitsianov stormed Ganja, resulting in the deaths of Djaavad Khan and his eldest son on the fortress walls. However, this did not prevent other descendants of the khan from recognizing the tsar’s authority and entering the Russian nobility as the Ziyatkhanovs, who would contribute several prominent politicians to the Russian Caucasus and the Azerbaijan Democratic Republic in the late 19th and early 20th centuries.

Ganja's Shakh Abbas mosque
Ganja’s Shakh Abbas mosque

As a vassal capital, Ganja was not retained for long, and it was swiftly renamed in the same year, 1804, in honor of the German Empress Elizabeth Alexeyevna, who had no connection to the Caucasus or Persia. Under the command of the newly appointed governor of Elisavetpol, the city gradually developed governmental institutions, becoming the district center of the Georgian-Imeretian province (later Tiflis province) by 1840. However, the realities of the Caucasus necessitated the creation of an additional region between Tbilisi and Baku, leading to the establishment of the Elisavetpol province in 1868. This province encompassed the territories of the former Sheki, Ganja, and Karabakh khanates, stretching from Sheki to Zangezur, and its population was predominantly Azerbaijani and Armenian. The Azerbaijani community primarily inhabited the plains and the Greater Caucasus, while Armenians settled in the mountains of the Lesser Caucasus, with only two districts (Zangezur and Shusha) having populations that nearly reached half of their total. By the early 20th century, Ganja had a population of around 33,000, with 55% being Azerbaijanis, 40% Armenians, and 7% Slavs, making it a leading provincial city, albeit just slightly larger than the county towns of Nukh and Shusha.

In June 1918, amid ongoing ethnic clashes since winter, the government of the Azerbaijan Democratic Republic arrived in Ganja from Tbilisi, and the swiftly renamed city became the first capital of the republic. However, by September, the Turkish army had passed through the city, compelling the government to relocate to Baku. Despite this, Ganja remained a national stronghold, and in May 1920, when the Red Army occupied Azerbaijan, the Ganja Uprising erupted, possibly with Turkish support. This rebellion was suppressed within a week, resulting in thousands of casualties. In 1935, the defiant city was renamed again, this time as Kirovabad, following an order from above.

Ruins of old khan's bridge
Ruins of old khan’s bridge

In 1992, the Russian army withdrew from Ganja, but General Surət Huseynov, who seized the arsenal left behind, led a rebellion and marched his troops toward Baku, effectively overthrowing the pro-Western president Abulfaz Elchibey, replacing him with the old party bureaucrat and national leader Heydar Aliyev. Gradually, life in Ganja returned to a semblance of normalcy, and it became increasingly difficult to believe that Ganja had not always been a mono-ethnic city.