Sahih al-Bukhari 6961
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
حَدَّثَنَا مُسَدَّدٌ، حَدَّثَنَا يَحْيَى، عَنْ عُبَيْدِ اللَّهِ بْنِ عُمَرَ، حَدَّثَنَا الزُّهْرِيُّ، عَنِ الْحَسَنِ، وَعَبْدِ اللَّهِ، ابْنَىْ مُحَمَّدِ بْنِ عَلِيٍّ عَنْ أَبِيهِمَا، أَنَّ عَلِيًّا ـ رضى الله عنه ـ قِيلَ لَهُ إِنَّ ابْنَ عَبَّاسٍ لاَ يَرَى بِمُتْعَةِ النِّسَاءِ بَأْسًا. فَقَالَ إِنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم نَهَى عَنْهَا يَوْمَ خَيْبَرَ، وَعَنْ لُحُومِ الْحُمُرِ الإِنْسِيَّةِ. وَقَالَ بَعْضُ النَّاسِ إِنِ احْتَالَ حَتَّى تَمَتَّعَ، فَالنِّكَاحُ فَاسِدٌ. وَقَالَ بَعْضُهُمُ النِّكَاحُ جَائِزٌ وَالشَّرْطُ بَاطِلٌ.
Narrated Muhammad bin `Ali:
`Ali was told that Ibn `Abbas did not see any harm in the Mut'a marriage. `Ali said, "Allah's Messenger (ﷺ) forbade the Mut'a marriage on the Day of the battle of Khaibar and he forbade the eating of donkey's meat." Some people said, "If one, by a tricky way, marries temporarily, his marriage is illegal." Others said, "The marriage is valid but its condition is illegal."
Full reference and source
Sahih al-Bukhari 6961 In-book : Book 90, Hadith 8 USC-MSA web (English) : Vol. 9, Book 86, Hadith 91 (deprecated)
View source on Sunnah.com (opens in a new tab)