كتاب الْمَسَاجِدِ وَمَوَاضِعِ الصَّلاَةِ
5
The Book of Mosques and Places of Prayer
(36)
Chapter: The evidence for those who say that “the middle prayer” is the `Asr prayer
(36)
باب الدَّلِيلِ لِمَنْ قَالَ الصَّلاَةُ الْوُسْطَى هِيَ صَلاَةُ الْعَصْرِ ‏
Sahih Muslim 630

Al-Bara' b. 'Azib reported:

This verse was revealed (in this way):" Guard the prayers and the 'Asr prayer." We recited it (in this very way) so long as Allah desired. Allah, then, abrogated it and it was revealed:" Guard the prayers, and the middle prayer." A person who was sitting with Shaqiq (one of the narrators in the chain of transmitters) said: Now it implies the 'Asr prayer. Upon this al-Bara' said: I have already informed you how this (verse) was revealed and how Allah abrogated it, and Allah knows best.
حَدَّثَنَا إِسْحَاقُ بْنُ إِبْرَاهِيمَ الْحَنْظَلِيُّ، أَخْبَرَنَا يَحْيَى بْنُ آدَمَ، حَدَّثَنَا الْفُضَيْلُ بْنُ مَرْزُوقٍ، عَنْ شَقِيقِ بْنِ عُقْبَةَ، عَنِ الْبَرَاءِ بْنِ عَازِبٍ، قَالَ نَزَلَتْ هَذِهِ الآيَةُ حَافِظُوا عَلَى الصَّلَوَاتِ وَصَلاَةِ الْعَصْرِ ‏.‏ فَقَرَأْنَاهَا مَا شَاءَ اللَّهُ ثُمَّ نَسَخَهَا اللَّهُ فَنَزَلَتْ ‏{‏ حَافِظُوا عَلَى الصَّلَوَاتِ وَالصَّلاَةِ الْوُسْطَى‏}‏ فَقَالَ رَجُلٌ كَانَ جَالِسًا عِنْدَ شَقِيقٍ لَهُ هِيَ إِذًا صَلاَةُ الْعَصْرِ ‏.‏ فَقَالَ الْبَرَاءُ قَدْ أَخْبَرْتُكَ كَيْفَ نَزَلَتْ وَكَيْفَ نَسَخَهَا اللَّهُ ‏.‏ وَاللَّهُ أَعْلَمُ ‏.‏
Reference : Sahih Muslim 630
In-book reference : Book 5, Hadith 264
USC-MSA web (English) reference : Book 4, Hadith 1317
  (deprecated numbering scheme)