major contender but was challenged by several adversaries. Abolfath Khan was the Vizier, Karim Khan became the army chief commander and Ali Morad Khan became the regent. Karim Khan declared Shiraz his capital, and in 1778 Tehran became the second capital. He gained control of central and southern parts of Iran. In order to add legitimacy to his claim, Karim Khan placed the infant Shah Ismail III, the grandson of the last Safavid king, on the throne in 1757. Ismail was a figurehead king and real power was vested in Karim Khan. Karim Khan chose to be the military commander and Alimardan Khan was the civil administrator. Soon enough Karim Khan managed to eliminate his partner as well as the puppet king and in 1760, founded his own dynasty. He refused to accept the title of the king and instead named himself Vakilol Ro'aya (Advocate of the People). By 1760, Karim Khan had defeated all his rivals and controlled all of Iran except Khorasan, in the northeast, which was ruled by Shah Rukh. His foreign campaigns against Azad Khan in Azerbaijan and against the Ottomans in Mesopotamia brought Azerbaijan and the province of Basra into his control. But he never stopped his campaigns against his arch-enemy, Mohammad Hassan Khan Qajar, the chief of the Qoyunlu Qajars. The latter was finally defeated by Karim Khan and his sons, Agha Mohammad Khan and Hossein Qoli Khan Qajar, were brought to Shiraz as hostages. Karim Khan's monuments in Shiraz include the famous Arg of Karim Khan, Vakil Bazaar, and several mosques and gardens. He is also responsible for building of a palace in the town of Tehran, the future capital of the Qajar dynasty. Decline and fall Karim Khan's death in 1779 left his territory vulnerable to threats from his enemies. His son and successor Abu al-Fath was an incompetent ruler who was heavily influenced by his half uncle (and Karim Khan's commander), Zaki Khan. Other rulers such as Ali Morad and Jafar Khan also failed to follow the policies of Karim Khan and soon enough, the country was under attack from all sides. The biggest enemies of the Zands, the Qajar chiefs, led by the former hostage, Agha Mohammad Khan, were advancing fast against the declining kingdom. Finally, in 1789, Lotf Ali Khan, a grand-nephew of Karim Khan, declared himself the new king. His reign (until 1794) was spent mostly in war