Historically an important city of the South Caucasus, Ganja has been part of the Sassanid Empire, Great Seljuk Empire, Kingdom of Georgia, Atabegs of Azerbaijan, Khwarezmid Empire, Il-Khans, Timurids, Qara Qoyunlu, Ak Koyunlu, the Safavid, the Afsharid, the Zand and the Qajar empires of Persia/Iran. Prior to the Iranian Zand and Qajar rule, following Nader Shah's death, it was ruled locally for a few decades by the khans/dukes of the Ganja Khanate, who themselves were subordinate to the central rule in mainland Iran and were a branch of the Iranian Qajar family. Ganja is also the birthplace of the famous Persian poet Nizami Ganjavi.