Ibrahim I of Shirvan

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.

[2] When Timur arrived at the Caucasus in 1394, Ibrahim gave him gifts and riches as presents in order to maintain good relations with him.

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.

[3] He died in 1417 and was succeeded by his son Khalilullah I. 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.

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.

Map of Caucasus and its surroundings.
Mosque in Baku constructed during the reign of Ibrahim I.