Sahih Muslim Book 19, Hadith Number 4315.

Chapter : Desirability of praying for victory at the time of confrontation with the enemy.

It is narrated on the authority of Ibn Abu Aufa that the Messenger of Allah (may peace be upon him) cursed the tribes (who had marched upon Medina with a combined force in 5 H) and said: O Allah, Revealer of the Book, swift in (taking) account, put the tribes to rout. O Lord, defeat them and shake them.