In the first year after Migration (Hijrah), Mohammad (pbuh), as a prophet and society leader, dedicated his efforts towards consolidating the systems and governance of Medina. A constitution was drafted. This became the first recorded state constitution in the world. Medina gradually prospered.
As Medina grew in importance in the Arabian Peninsula, the significance of the Makkan Quraish began to dwindle. Its economy suffered as they could not trade with the Syrians (as-Shams) in the north and the Persians (Iraq and Iran) in the east. Medina was the gateway to these routes. This heightened their hatred towards the Muslim state of Medina .
In the second year after Migration (circa 624AD), the Quraish of Makkah attacked Medina. War broke out at Badr (the Battle of Badr), south of Medina. Although the Muslims were outnumbered 313 to 1000, they defeated the Quraish of Makkah. The Makkan leadership regrouped and in the third year after Migration (circa 625AD), they reattacked Medina. The battle took place at Uhud (the Battle of Uhud), 5km outside Medina. The Quraish came with an army of 3000 well-armed soldiers. They were led by Abu Sufyan and Khalid ibn Walid was one of the commanders (both were non Muslims then). Medina was defended by 700 men (and women). The battle was fiercely fought and again the Makkans finally retreated in defeat. However, about 70 of Mohammad’s (pbuh) companions were martyred at Uhud including his uncle, Hamzah Abu Talib. Mohammad (pbuh) was also injured in the battle.
Till today, the graves of the martyrs are preserved at the battle site of Uhud. Omrah pilgrims are recommended to visit this place to remember and pay respect to the sacrifices made by this first generation muslims. Seeking intercession from the martyrs however, in my humble opinion, is not an Islamic practice.
p.s. Abu Sufyan and Khalid Ibn Walid embraced Islam in 8th & 7th Hijrah respectively. Khalid became a renown general of the Muslim armies.