No authoritative count of battles exists for any Companion, because the early sources do not keep rolls of participation, and the commonly cited claims are that Ali, al-Zubayr, Abu Ayyub al-Ansari and Khalid ibn al-Walid (ra) each took part in a very large number of campaigns, with Khalid's often reported as more than a hundred engagements.
- The Prophet (saw) personally took part in a limited number of campaigns, and the early biographers list about twenty-seven expeditions (ghazawat) that he joined, of which he fought in only some.
- Ali ibn Abi Talib (ra) is reported to have been present at every major expedition except Tabuk, when the Prophet (saw) left him in Madinah, and the same is said of al-Zubayr ibn al-Awwam (ra).
- Khalid ibn al-Walid (ra) became Muslim late, but is reported to have fought in a great number of battles under the Prophet (saw) and the caliphs, and Abu Ayyub al-Ansari (ra) is reported to have kept going on campaign into old age.
- Hamza (ra) fell at Uhud and Talha (ra) missed Badr, so neither can be ranked highly by count, and Sa'd ibn Abi Waqqas (ra) and Abu Dujana (ra) are known for what they did more than for any tally.
Introduction
The question asks which of the Companions fought in the most battles. It can be answered in good faith only by separating what the sources actually say from what later popular books repeat. No early source gives a ranked list, and no source gives a count that is complete for any Companion. What exists are scattered reports in the biographical works, such as the Tabaqat of Ibn Sa'd, the Sira of Ibn Ishaq as edited by Ibn Hisham, the Maghazi of al-Waqidi, the Isti'ab of Ibn 'Abd al-Barr and the Isaba of Ibn Hajar al-'Asqalani.
Part of the difficulty is the word 'battle'. The sources distinguish a ghazwa, a campaign in which the Prophet (saw) himself took part, from a sariyya, a smaller force that he sent out without going himself. Many ghazawat ended without fighting, such as Tabuk, and several included only a short engagement. A count of 'battles' could mean campaigns joined, fights actually fought, or all of these together with the wars after the Prophet (saw), such as the conquests of Syria, Iraq and Egypt. These definitions give very different totals. This answer therefore reports what is attributed to each Companion and says where the claim is a later tradition.
The Qur'an honours those who stood in these struggles, without ranking them by number:
مِّنَ الْمُؤْمِنِينَ رِجَالٌ صَدَقُوا مَا عَاهَدُوا اللَّهَ عَلَيْهِ
"Among the believers are men who were true to what they pledged to Allah." (33:23)
How many campaigns the Prophet (saw) himself fought
Any count for a Companion who fought alongside the Prophet (saw) has a ceiling, namely the number of campaigns that the Prophet (saw) led. Sahih al-Bukhari records, in the Book of Military Expeditions, that Zayd ibn Arqam (ra) reported that the Prophet (saw) went on nineteen expeditions and that Zayd himself joined seventeen of them, and the chapter on how many expeditions the Prophet (saw) went on in the same book gathers the reports. Ibn Ishaq and the biographers who followed him list twenty-seven expeditions with the Prophet (saw) present, and say that he fought in only some of these, including Badr, Uhud, the Trench, Banu Qurayzah, Khaybar, the Conquest of Makkah, Hunayn and Ta'if. The totals differ because the authors define an expedition differently.
The same sources list many sariyyat, with totals that vary by author, usually between about thirty-five and fifty. A Companion could therefore have fought in campaigns that the Prophet (saw) did not lead, and this is why some figures reported for later fighters cannot be compared with those of the Prophet's own lifetime.
Ali, al-Zubayr and the earliest Muslims
Ali ibn Abi Talib (ra) is the Companion most often named. The biographers report that he was present at Badr, Uhud, the Trench, Khaybar and the later campaigns, and that he missed only Tabuk in 9 AH. At Tabuk the Prophet (saw) left him in charge of the family in Madinah, and when Ali (ra) was upset at being left, the Prophet (saw) said to him: are you not content to be to me as Harun was to Musa, except that there is no prophet after me. This is in Sahih al-Bukhari and Sahih Muslim, in the chapters on Tabuk and on the virtues of Ali. At Khaybar the Prophet (saw) said that he would give the banner to a man whom Allah and His Messenger love, and gave it to Ali (ra) (Sahih al-Bukhari and Sahih Muslim, Khaybar chapters). Because he was in nearly every expedition, Ali is often named as the Companion with the most campaigns, but no early source gives him a number.
Al-Zubayr ibn al-Awwam (ra), a cousin of the Prophet (saw) and the son of his paternal aunt Safiyya, is reported by Ibn Sa'd and later biographers to have been present at all the major expeditions from Badr onwards. The Prophet (saw) said on the day of the Trench: every prophet has a disciple (hawari) and my disciple is al-Zubayr (Sahih al-Bukhari and Sahih Muslim). He is one of the ten promised Paradise in the hadith of Sa'id ibn Zayd recorded in Sunan Abi Dawud and Jami' al-Tirmidhi and graded sahih by al-Albani, and he fought later at the Yarmuk and in Egypt. Al-Miqdad ibn al-Aswad (ra) and Abu Talha al-Ansari (ra) are also said to have been present at Badr and nearly all of the later campaigns.
Khalid, Abu Dujana, Abu Ayyub and Sa'd
Khalid ibn al-Walid (ra) fought against the Muslims at Uhud and accepted Islam in 8 AH, before the Muslim defeat at Mu'ta. He then took the banner after the three commanders had fallen, and the Prophet (saw) called him a sword among the swords of Allah (Sahih al-Bukhari, Book of Military Expeditions, the chapter on Mu'ta). He fought in the Conquest of Makkah and at Hunayn, led the army in the wars against the apostates under Abu Bakr (ra), and then in Iraq and Syria, including the Yarmuk. Later biographers, among them al-Dhahabi in Siyar A'lam al-Nubala', report that on his deathbed he said that he had been in about a hundred battles or more and that no part of his body was free of a mark from a sword, spear or arrow. This is a report and not a measured count, and it is why many writers say that Khalid fought in more battles than any other Companion, in the sense of engagements over his whole career.
Abu Dujana Simak ibn Kharasha (ra) is remembered for Uhud. The Prophet (saw) held up a sword and asked who would take it and give it its due, and Abu Dujana (ra) took it, tied a red cloth around his head and went forward through the ranks (reported in Sahih Muslim, in the chapter on the virtues of Abu Dujana). He is reported to have fought at Badr and in later campaigns, and he died at the Battle of Yamama, but no count is given. Abu Ayyub Khalid ibn Zayd al-Ansari (ra), in whose house the Prophet (saw) stayed on arriving in Madinah, fought at Badr and later campaigns, and Ibn 'Abd al-Barr reports that he rarely stayed behind from an expedition. He went with the army sent against Constantinople in the time of Mu'awiya and died in the siege and was buried near its walls. The date is given by the sources as about 50 to 52 AH.
Sa'd ibn Abi Waqqas (ra) is reported as the first to shoot an arrow in the way of Allah, and at Uhud the Prophet (saw) said to him: shoot, may my father and mother be given for you (Sahih al-Bukhari, Book of Military Expeditions, Uhud). He was present at Badr and the campaigns that followed, and he commanded the Muslim army at Qadisiyya in Iraq. He is therefore a candidate for the number of engagements, though the sources do not count them.
Hamza, Talha and others who cannot lead the count
Hamza ibn 'Abd al-Muttalib (ra), the uncle of the Prophet (saw), is often mentioned in lists of famous fighters because of his courage, but he was killed at Uhud in 3 AH, so he fought only at Badr and Uhud, and perhaps in a few early raids. His fame does not rest on the number of battles. Talha ibn 'Ubaydullah (ra) was sent away on a mission with Sa'id ibn Zayd before Badr, so he was absent, but the Prophet (saw) gave him a share of the spoils and the reward of those who were present. He fought at Uhud, where he shielded the Prophet (saw) and was wounded, and the report is that his hand was impaired (Sahih al-Bukhari, Book of the Virtues of the Companions). He was killed at the Battle of the Camel in 36 AH.
Some Companions are known for specific numbers given in the hadith literature. Al-Bara' ibn 'Azib (ra) reported that he joined fifteen expeditions with the Prophet (saw), and Salama ibn al-Akwa' (ra) reported in Sahih al-Bukhari and Sahih Muslim that he fought seven expeditions with the Prophet (saw) and nine more in parties led by Zayd ibn Haritha (ra). Such reports are valuable because they come from the fighters themselves, and they show the scale of what was possible in the Prophet's lifetime. Abdullah ibn Umar (ra), by contrast, was refused at Uhud for his age and joined first at the Trench (Sahih al-Bukhari, Book of Testimonies).
Why no authoritative count exists
Three reasons can be given. First, the authors define the word 'battle' differently, as shown above. Second, the biographers recorded who attended the great engagements, notably Badr, with attendance lists, but did not keep lists for the hundreds of smaller actions, and after the Prophet's death the armies were numbered in thousands and no roll of each man's service survives. Third, popular statements, such as that a Companion fought 'in all battles', usually mean all the major ones in which the Prophet (saw) took part, and should not be read as an exact figure.
The classical scholars of the Companions, such as Ibn 'Abd al-Barr and Ibn Hajar, did not rank Companions by battles. They ranked them by precedence in Islam, as in the verse: the first forerunners among the Emigrants and the Helpers (9:100), and by the virtue of those who spent and fought before the Conquest, as in 57:10. By this standard the number of battles is only one factor among many.
Conclusion
The Companions most often named for the number of campaigns are Ali, al-Zubayr and Abu Ayyub al-Ansari for the lifetime of the Prophet (saw) and after it, and Khalid ibn al-Walid (ra) for the total of engagements over his whole career. These claims rest on reports in the biographical works and on the Companions' own words, and none is an exact count. No authoritative number exists for any Companion, and an honest answer lists the candidates and their reports without ranking them beyond what the sources say.
References
Qur'an 9:100, 33:23, 57:10
Sahih al-Bukhari: Book of Military Expeditions (chapters on Uhud, Khaybar, Mu'ta and Tabuk and the number of expeditions); Book of the Virtues of the Companions; Sahih Muslim: Book of the Virtues of the Companions (chapters on Ali, al-Zubayr and Abu Dujana)
Ibn Sa'd, al-Tabaqat al-Kubra; Ibn Hisham, al-Sira al-Nabawiyya; al-Waqidi, Kitab al-Maghazi
Ibn 'Abd al-Barr, al-Isti'ab fi Ma'rifat al-Ashab; Ibn Hajar al-'Asqalani, al-Isaba fi Tamyiz al-Sahaba; al-Dhahabi, Siyar A'lam al-Nubala'