Jami` at-Tirmidhi, Volume 2, Book 9, Hadith 1122 (DarusSalam)

Muhammad bin Ka'b narrated that: Ibn Abbas said: "Mut'ah was only during the beginning of Islam. A man would arrive in a land that he was not familiar with so he would marry a woman for the extent of time that he thought he would remain there. So his Mut'ah was upheld and his case was fine until the (following) Ayah was revealed: Except their wives or what their right hands possess. Then every private part other than those became unlawful."

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

sunnah.com