The Battle of Trench, also known as Ghazwat al-Khandaq or the Battle of the Confederates, was a pivotal defensive engagement in early Islamic history. This significant event occurred in the 5th year of the Hijrah calendar. During this battle, a large coalition of pagan Arab tribes and Jewish tribes besieged the city of Medina. The Muslims, under the leadership of Prophet Muhammad (peace be upon him), successfully defended Medina by digging a massive trench around the vulnerable parts of the city, a strategy suggested by Salman the Persian. This innovative defense thwarted the attackers.
Option A, 3 Hijri, is incorrect as the Battle of Uhud took place then. Option B, 4 Hijri, saw other skirmishes but not the Battle of Trench. Option D, 7 Hijri, is incorrect as the Battle of Khaybar occurred in that year. Thus, 5 Hijri is the accurate historical date for the Battle of Trench.