Sahih Bukhari Volume 2, Book 14, Hadith Number 65

Narated By Nafi’ : Ibn Umar said something similar to Mujahid’s saying: Whenever (Muslims and non-Muslims) stand face to face in battle, the Muslims can pray while standing. Ibn Umar added, “The Prophet said, ‘If the number of the enemy is greater than the Muslims, they can pray while standing or riding (individually).'”