(Imām Bukhārī narrates): 'Abdullāh ibn Maslamah narrated to us, from Imām Mālik, from Nu'aim ibn 'Abdullāh al-Mujmir, from 'Alī ibn Yahyā ibn Khallād al-Zuraqī, from his father, from Rifā'ah ibn Rāfi' al-Zuraqī, he narrated that:
one day we were praying behind the Prophet ﷺ. When the Prophet ﷺ raised his head from rukū', he said "Sami'a Allāhu liman hamidah." Then a man behind him said: "Rabbanā wa laka al-hamd, hamdan kathīran tayyiban mubārakan fīh." When he turned after praying, he asked: Who was saying these (words)? He said: I. He said: I saw more than thirty angels racing to see which of them would write these words first.
حَدَّثَنَا عَبْدُ اللَّهِ بْنُ مَسْلَمَةَ، عَنْ مَالِكٍ، عَنْ نُعَيْمِ بْنِ عَبْدِ اللَّهِ الْمُجْمِرِ، عَنْ عَلِيِّ بْنِ يَحْيَى بْنِ خَلاَّدٍ الزُّرَقِيِّ، عَنْ أَبِيهِ، عَنْ رِفَاعَةَ بْنِ رَافِعٍ الزُّرَقِيِّ، قَالَ كُنَّا يَوْمًا نُصَلِّي وَرَاءَ النَّبِيِّ صلى الله عليه وسلم فَلَمَّا رَفَعَ رَأْسَهُ مِنَ الرَّكْعَةِ قَالَ " سَمِعَ اللَّهُ لِمَنْ حَمِدَهُ ". قَالَ رَجُلٌ وَرَاءَهُ رَبَّنَا وَلَكَ الْحَمْدُ، حَمْدًا كَثِيرًا طَيِّبًا مُبَارَكًا فِيهِ، فَلَمَّا انْصَرَفَ قَالَ " مَنِ الْمُتَكَلِّمُ ". قَالَ أَنَا. قَالَ " رَأَيْتُ بِضْعَةً وَثَلاَثِينَ مَلَكًا يَبْتَدِرُونَهَا، أَيُّهُمْ يَكْتُبُهَا أَوَّلُ ".
Reference: Sahih Al Bukhari 799