كتاب النكاح
16  
The Book of Marriage
(3)
Chapter: Mut'ah Marriage: It was permitted then abrograted, then permitted then abrogated, and it will remain Forbidden until the day of resurrection
(3)
باب نِكَاحِ الْمُتْعَةِ وَبَيَانِ أَنَّهُ أُبِيحَ ثُمَّ نُسِخَ ثُمَّ أُبِيحَ ثُمَّ نُسِخَ وَاسْتَقَرَّ تَحْرِيمُهُ إِلَى يَوْمِ الْقِيَامَةِ
Sahih Muslim 1406 f

'Abd al-Malik b. Rabi' b. Sabraal-Juhanni reported on the authority of his father who narrated it on the authority of his father (i e. 'Abd al-Malik's grandfather, Sabura al-Juhanniy Allah's Messenger (ﷺ) permitted us to contract temporary marriage in the Year of Victory, as we entered Mecca, and we did come out of it but he forbade us to do it.

حَدَّثَنَا إِسْحَاقُ بْنُ إِبْرَاهِيمَ، أَخْبَرَنَا يَحْيَى بْنُ آدَمَ، حَدَّثَنَا إِبْرَاهِيمُ بْنُ سَعْدٍ، عَنْ عَبْدِ الْمَلِكِ بْنِ الرَّبِيعِ بْنِ سَبْرَةَ الْجُهَنِيِّ، عَنْ أَبِيهِ، عَنْ جَدِّهِ، قَالَ أَمَرَنَا رَسُولُ اللَّهِ صلى الله عليه وسلم بِالْمُتْعَةِ عَامَ الْفَتْحِ حِينَ دَخَلْنَا مَكَّةَ ثُمَّ لَمْ نَخْرُجْ مِنْهَا حَتَّى نَهَانَا عَنْهَا‏.‏
Reference : Sahih Muslim 1406f
In-book reference : Book 16, Hadith 27
USC-MSA web (English) reference : Book 8, Hadith 3257
  (deprecated numbering scheme)