[Machine] I heard Abdullah ibn Mas'ud say, "We used to go on raids with the Messenger of Allah ﷺ and there were no women among us. We wanted to have our own women with us, so the Messenger of Allah ﷺ forbade us from doing so. Then he allowed us to have temporary marriages with women for a specified period." Abu Abdullah added in his narration, with his chain of narrators, that Ash-Shafi'i said, "Ibn Mas'ud mentioned Al-Irkhas (temporary marriage) in relation to Mut'ah (pleasure marriage), but he did not specify a time frame, whether it was before or after the Battle of Khaybar." The similar narration is from Ali ibn Abi Talib, in which the Prophet ﷺ forbade Mut'ah, and Allah knows best whether it was abrogated or not. Sheikh (Al-Albani) may Allah have mercy on him said that it was also narrated in a hadith of Ibn Mas'ud that he said, "We were young men..."
سَمِعْتُ عَبْدَ اللهِ بْنَ مَسْعُودٍ ؓ يَقُولُ كُنَّا نَغْزُو مَعَ رَسُولِ اللهِ ﷺ وَلَيْسَ مَعَنَا نِسَاءٌ فَأَرَدْنَا أَنْ نَخْتَصِيَ فَنَهَانَا عَنْ ذَلِكَ رَسُولُ اللهِ ﷺ ثُمَّ رَخَّصَ لَنَا أَنْ نَنْكِحَ الْمَرْأَةَ إِلَى أَجَلٍ بِالشَّيْءِ زَادَ أَبُو عَبْدِ اللهِ فِي رِوَايَتِهِ بِإِسْنَادِهِ قَالَ قَالَ الشَّافِعِيُّ ذَكَرَ ابْنُ مَسْعُودٍ الْإِرْخَاصَ فِي نِكَاحِ الْمُتْعَةِ وَلَمْ يُوَقِّتْ شَيْئًا يَدُلُّ أَهُوَ قَبْلَ خَيْبَرَ أَوْ بَعْدَهَا وَأَشْبَهَ حَدِيثُ عَلِيِّ بْنِ أَبِي طَالِبٍ ؓ فِي نَهْيِ النَّبِيِّ ﷺ عَنِ الْمُتْعَةِ أَنْ يَكُونَ وَاللهُ أَعْلَمُ نَاسِخًا لَهُ قَالَ الشَّيْخُ رَحِمَهُ اللهُ وَقَدْ رُوِيَ فِي حَدِيثِ ابْنِ مَسْعُودٍ أَنَّهُ قَالَ كُنَّا وَنَحْنُ شَبَابٌ