The Battle of Dandanaqan is fought in 1040 between the Seljuqs and the Ghaznavid Empire.
The battle ends with a Seljuq victory and brings down the Ghaznavid domination in Khorasan.
"What is past is prologue"
― William Shakespeare, The Tempest (C. 1610-1611)