By 1760 Karim Khan had defeated all his rivals and controlled all of Iran except Khorasan, in the northeast, which was ruled by Shahrokh, the blind grandson of Nader Shah. During Karim Khan's rule Iran recovered from the devastation of 40 years of war. He made Shiraz his capital, constructing many fine buildings. Moreover, he reorganized the fiscal system of the kingdom, removing some of the heavy burdens of taxation from the agricultural classes. An active patron of the arts, he attracted many scholars and poets to his capital.
Karim Khan also opened Iran to foreign influence by allowing the English East India Company to establish a trading post in Bushire, the Persian Gulf port (1763). In advancing his policy of developing trade, in 1775-76 he attacked and captured Basra, the Ottoman port at the mouth of the Persian Gulf, which had diverted much of the trade with India away from Iranian ports.
The civil war that followed Karim Khan's death ended only with the final establishment of the Qajar dynasty in. His death in 1779 was followed by internal dissensions and disputes over successions. Between 1779 and 1789 five Zand kings ruled briefly. In 1789 Lotf Ali Khan (ruled 1789-94) proclaimed himself as the new Zand king and took energetic action to put down a rebellion led by Agha Mohammad Khan Qajar that had begun at Karim Khan's death. Outnumbered by the superior Qajar forces, Lotf Ali Khan was finally defeated and captured at Kerman in 1794. His defeat marked the final eclipse of the Zand dynasty, which was supplanted by that of the Qajars.