it remained this way until the rise of mirwais hotak, a well-respected sunni ghilzai pashtun tribal chief. mirwais succeeded in defeating the declining safavids in a succession of battles and declared southern afghanistan a completely independent country. his son mahmud conquered persia for a short time in 1722, while it was ridden by civil strife and foreign interests from the safavids their arch rivals, the ottomans and the russians. and soon after the safavid dynasty ended.