Shah Ismail I, founder of the Safavid dynasty, conquered Mashhad after the death of Husayn Bayqarah and the decline of the Timurid dynasty. He was later captured by the Uzbeks during the reign of Shah Abbas I. In the 16th century the town suffered considerably from the repeated raids of the Özbegs (Uzbeks). In 1507, it was taken by the troops of the Shaybani or Shabani Khan. After two decades, Shah Tahmasp I succeeded in repelling the enemy from the town again in 1528.