The Rajputs made a belated alliance and fought valiantly from one desert fortress to another , but their elephants could not match their opponents ' fast horses and Afghan cavalry firing superior crossbows at the gallop .
The Rajputs and the Afghans were in a war .