Although the Chaldiran defeat brought an end to Ismail's territorial expansion program, the shah nonetheless took immediate steps to protect against the real threat from the Ottoman sultanate by arming his troops with gunpowder weapons. Within two years of Chaldiran, Ismail had a corps of musketeers ("tofangchi") numbering 8,000, and by 1521, possibly 20,000. After Abbas the Great reformed the army (around 1598), the Safavid forces had an artillery corps of 500 cannons as well as 12,000 musketeers.