In 1709, Mirwais Hotak, a local Ghilzai tribal leader, successfully rebelled against the Safavids. He defeated Gurgin Khan and established his own kingdom. Mirwais died of natural causes in 1715 and was succeeded by his brother Abdul Aziz, who was soon killed by Mirwais' son Mahmud for possibly planning to concede territories back to the Safavids. Mahmud led the Afghan army in 1722 to the Persian capital of Isfahan, captured the city after the Battle of Gulnabad and proclaimed himself King of Persia. The Afghan dynasty was ousted from Persia by Nader Shah after the 1729 Battle of Damghan.