At Badr in 2 AH (624 CE), a little over three hundred believers faced a force of about a thousand. Umar ibn al-Khattab recorded the Prophet ﷺ turning to the qiblah in earnest supplication. The Qur'an says: “Allah had already given you victory at Badr while you were few” (3:123).
A year later Quraysh marched on Madinah and the armies met at Uhud. He posted archers with a firm order not to leave their place, whatever they saw. Most left when the enemy appeared to flee, despite their commander's objections, and the Muslims suffered seventy deaths. The Prophet's uncle Hamzah was among those killed.