Ibrahim I of Shirvan

Ibrahim I was the 33rd Shirvanshah (ruler of Shirvan, r. 1382–1418). Because of his cunning politics he managed to remain independent and avoid being deposed by the Turko-Mongol ruler Timur.

Family and accession to the throne
According to a story by Aḥmad Ḡaffāri Qazvini, author of Tāriḵ-e jahānārā dedicated to Tahmasp I, son of the Shirvanian prince Sultan Muhammad, Ibrahim grew up in a village in Shakki, where he took care of the agriculture. After the death of his cousin Shirvanshah Hushang in 1382, Ibrahim I was selected to be the ruler by the local population.

Reign
In 1386, Ibrahim recognized the powerful Turko-Mongol ruler Timur as his suzerain. When Timur arrived at the Caucasus in 1394, Ibrahim gave him gifts and riches as presents in order to maintain good relations with him. However, one of these gifts were eight slaves, which Timur did not see as enough—when he asked Ibrahim why he had only given eight slaves, Ibrahim replied: "I am myself the ninth". This made Timur glad, who due to the kindness of Ibrahim gave him much land and promised to protect him. From 1399 to 1402, Ibrahim fought alongside Timur in his campaigns in Syria and Anatolia. Timur later died in 1405, fighting and rebellion broke, causing great disruption. Ibrahim used the death of Timur as an opportunity to declare independence and seize Ganja and Karabakh.

In 1412, the Kara Koyunlu ruler Qara-Yusuf, who ruled Azerbaijan, invaded the territory of Ibrahim, who requested aid from the Georgian ruler Constantine I of Georgia, who came to his assistance; a battle shortly ensured near Chalagan, which resulted in the defeat of the combined Shirvanian-Georgian forces. Ibrahim, along with his sons and Constanine were then imprisoned.

Some time later, due to the bad behavior of Constantine, Qara-Yusuf had him, his son and other Georgians executed. Furthermore, Qara-Yusuf had also caused great destruction in Shirvan. Ibrahim later paid a huge amount of money in return for being freed. Ibrahim went back to his kingdom and struggled to restore order in it. He died in 1417 and was succeeded by his son Khalilullah I.

Legacy
Ibrahim I revived Shirvan's independence, and through his cunning politics managed to avoid Timurid conquest, letting his kingdom survive without paying tribute, as well as gaining a powerful alliance. A politics that would continue under his descendants. Ibrahim also recovered the borders of his state as far as Derbent in north and the Mugan plain to the south which was lost under his predecessors.

Family
Ibrahim was married to Bika khanum (d. 1435), a noblewoman, with whom he had 11 sons and a daughter:
 * Khalilullah I — d. 1465, succeeded him as Shirvanshah.
 * Kayumars — d. circa 1412 imprisoned by Qara-Yusuf, pardoned and returned to Ibrahim, but being suspicious of possible conspiracy against himself, Kayumars was executed, which triggered Battle of Chalagan
 * Gazanfar (1398 – 1443) — imprisoned by Qara-Yusuf in Battle of Chalagan, was acting as the governor of Baku during the absence of Khalilullah I.
 * Kayqubad — rebelled against Khalilullah I in 1425, executed by Shahrukh Mirza.
 * Ishaq — rebelled against Khalilullah I in 1425, executed by Shahrukh Mirza.
 * Asadullah — imprisoned by Qara-Yusuf in Battle of Chalagan.
 * Manuchihr — imprisoned by Qara-Yusuf in Battle of Chalagan, later was in service of Shahrukh Mirza.
 * Abdurrahman — imprisoned by Qara-Yusuf in Battle of Chalagan.
 * Nasratullah — imprisoned by Qara-Yusuf in Battle of Chalagan.
 * Hashim — imprisoned by Qara-Yusuf in Battle of Chalagan, rebelled against Khalilullah I in 1425, executed by Shahrukh Mirza.
 * Farrukhzad — imprisoned by Qara-Yusuf in Battle of Chalagan.
 * Lal Bi Tukmak — married to Timur's son Umar Shaikh Mirza I in c. 1387

Popular culture
There is a street in Shamakhy named after him. He was played by Samandar Rzayev in the 1973 film Nesimi.