كتاب الحيض
3  
The Book of Menstruation
(21)
Chapter: At the beginning of Islam, intercourse did not necessitate ghusl unless semen was emitted, then that was abrogated and ghusl becomes obligatory for intercourse
(21)
باب إِنَّمَا الْمَاءُ مِنَ الْمَاءِ ‏
Sahih Muslim 343 a

Sa'id al-Khudri narrated it from his father:

I went to Quba' with the Messenger of Allah (ﷺ) on Monday till we reached (the habitation) of Banu Salim. The Messenger of Allah (ﷺ) stood at the door of 'Itban and called him loudly. So he came out dragging his lower garnment. Upon this the Messenger of Allah (ﷺ) said: We have made this man to make haste 'Itban said: Messenger of Allah, if a man parts with his wife suddenly without seminal emission, what is he required to do (with regard to bath)? The Messenger of Allah (ﷺ) said: It is with the seminal emission that bath becomes obligatory.
وَحَدَّثَنَا يَحْيَى بْنُ يَحْيَى، وَيَحْيَى بْنُ أَيُّوبَ، وَقُتَيْبَةُ، وَابْنُ، حُجْرٍ - قَالَ يَحْيَى بْنُ يَحْيَى أَخْبَرَنَا وَقَالَ الآخَرُونَ، حَدَّثَنَا إِسْمَاعِيلُ، - وَهُوَ ابْنُ جَعْفَرٍ - عَنْ شَرِيكٍ، - يَعْنِي ابْنَ أَبِي نَمِرٍ - عَنْ عَبْدِ الرَّحْمَنِ بْنِ أَبِي سَعِيدٍ الْخُدْرِيِّ، عَنْ أَبِيهِ، قَالَ خَرَجْتُ مَعَ رَسُولِ اللَّهِ صلى الله عليه وسلم يَوْمَ الاِثْنَيْنِ إِلَى قُبَاءٍ حَتَّى إِذَا كُنَّا فِي بَنِي سَالِمٍ وَقَفَ رَسُولُ اللَّهِ صلى الله عليه وسلم عَلَى بَابِ عِتْبَانَ فَصَرَخَ بِهِ فَخَرَجَ يَجُرُّ إِزَارَهُ فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ أَعْجَلْنَا الرَّجُلَ ‏"‏ ‏.‏ فَقَالَ عِتْبَانُ يَا رَسُولَ اللَّهِ أَرَأَيْتَ الرَّجُلَ يُعْجَلُ عَنِ امْرَأَتِهِ وَلَمْ يُمْنِ مَاذَا عَلَيْهِ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ إِنَّمَا الْمَاءُ مِنَ الْمَاءِ ‏"‏ ‏.‏
Reference : Sahih Muslim 343a
In-book reference : Book 3, Hadith 97
USC-MSA web (English) reference : Book 3, Hadith 674
  (deprecated numbering scheme)