Sunan Abi Dawud, Hadith 924

Narrated Abdullah ibn Mas'ud: We used to salute during prayer and talk about our needs. I came to the Messenger of Allah and found him praying. I saluted him, but he did not respond to me. I recalled what happened to me in the past and in the present. When the Messenger of Allah finished his prayer, he said to me: Allah, the Almighty, creates new command as He wishes, and Allah, the Exalted, has sent a fresh command that you must not talk during prayer. He then returned my salutation.

حَدَّثَنَا مُوسَى بْنُ إِسْمَاعِيلَ، حَدَّثَنَا أَبَانُ، حَدَّثَنَا عَاصِمٌ، عَنْ أَبِي وَائِلٍ، عَنْ عَبْدِ اللَّهِ، قَالَ كُنَّا نُسَلِّمُ فِي الصَّلاَةِ وَنَأْمُرُ بِحَاجَتِنَا فَقَدِمْتُ عَلَى رَسُولِ اللَّهِ صلى الله عليه وسلم وَهُوَ يُصَلِّي فَسَلَّمْتُ عَلَيْهِ فَلَمْ يَرُدَّ عَلَىَّ السَّلاَمَ فَأَخَذَنِي مَا قَدُمَ وَمَا حَدُثَ فَلَمَّا قَضَى رَسُولُ اللَّهِ صلى الله عليه وسلم الصَّلاَةَ قَالَ ‏ "‏ إِنَّ اللَّهَ يُحْدِثُ مِنْ أَمْرِهِ مَا يَشَاءُ وَإِنَّ اللَّهَ جَلَّ وَعَزَّ قَدْ أَحْدَثَ مِنْ أَمْرِهِ أَنْ لاَ تَكَلَّمُوا فِي الصَّلاَةِ ‏" ‏ ‏.‏ فَرَدَّ عَلَىَّ السَّلاَمَ ‏.‏

sunnah.com