The Battle of Dandanaqan was fought between the army of the Seljuqs and the Ghaznavid Empire. The battle ended with a Seljuq victory and brought down the Ghaznavid domination in the Khorasan.
During the march of Sultan Mas'ud's army to Sarakhs the Seljuq raiders wore out the Ghaznavid battalions with hit-and-run tactics. Seljuq raiders also harmed the supply lines of Ghaznavids, cutting them off from the nearby water wells. The discipline and morale of the Ghaznavid Army dropped seriously. Finally, on May 23, 1040, 20,000 Seljuk soldiers engaged in battle the 50,000 Ghaznavid soldiers in Dandanaqan, between Merv and Sarakhs.