Since arriving at Medina after the Hijra of 622 CE, the Muslim community had begun raiding Meccan caravans traveling the trade route along the Red Sea coast, both to support itself economically and to press Mecca, which had confiscated the property the emigrants left behind. In Ramadan of the second year after the Hijra, word reached Muhammad that a large caravan was returning from Syria under Abu Sufyan ibn Harb, and he set out from Medina with a small force, reckoned in the sources at about three hundred and thirteen men, intending to intercept it.
Abu Sufyan learned of the danger and sent word ahead to Mecca while diverting the caravan onto a coastal route that avoided the interception point at Badr, and it reached Mecca safely. Quraysh, however, had already mobilized a relief force of roughly a thousand men under Abu Jahl ibn Hisham to protect the caravan, and rather than turn back once the goods were safe, the Meccan leadership pressed on toward Badr, unwilling to be seen retreating before the smaller Muslim party. The two forces met at the wells of Badr, and a raid aimed at commerce became a battle neither side had originally set out to fight in that form. That the clash fell within Ramadan, a month in which fighting was traditionally restrained by regional custom, was itself remarked upon within the tradition, though it did not by itself decide whether either side would give ground once the armies had already met in the field.