كتاب المغازى
64  
Military Expeditions led by the Prophet (pbuh) (Al-Maghaazi)
(11)
Chapter: The participation of angels in (the battle) of Badr
(11)
باب شُهُودِ الْمَلاَئِكَةِ بَدْرًا
Sahih al-Bukhari 3992

Narrated Rifaa:

(who was one of the Badr warriors) Gabriel came to the Prophet (ﷺ) and said, "How do you look upon the warriors of Badr among yourselves?" The Prophet (ﷺ) said, "As the best of the Muslims." or said a similar statement. On that, Gabriel said, "And so are the Angels who participated in the Badr (battle).

حَدَّثَنِي إِسْحَاقُ بْنُ إِبْرَاهِيمَ، أَخْبَرَنَا جَرِيرٌ، عَنْ يَحْيَى بْنِ سَعِيدٍ، عَنْ مُعَاذِ بْنِ رِفَاعَةَ بْنِ رَافِعٍ الزُّرَقِيِّ، عَنْ أَبِيهِ ـ وَكَانَ أَبُوهُ مِنْ أَهْلِ بَدْرٍ ـ قَالَ جَاءَ جِبْرِيلُ إِلَى النَّبِيِّ صلى الله عليه وسلم فَقَالَ ‏ "‏ مَا تَعُدُّونَ أَهْلَ بَدْرٍ فِيكُمْ قَالَ مِنْ أَفْضَلِ الْمُسْلِمِينَ ـ أَوْ كَلِمَةً نَحْوَهَا ـ قَالَ وَكَذَلِكَ مَنْ شَهِدَ بَدْرًا مِنَ الْمَلاَئِكَةِ ‏"‏‏.‏
Reference : Sahih al-Bukhari 3992
In-book reference : Book 64, Hadith 43
USC-MSA web (English) reference : Vol. 5, Book 59, Hadith 327
  (deprecated numbering scheme)