We used to go on campaigns with the Messenger of Allah ﷺ without our wives, so we said, "Should we not have ourselves castrated?" He forbade us from that. Then he permitted us to marry a woman for a fixed term in exchange for a garment.Then Abdullah recited, "You who believe, do not forbid the good things Allah has made lawful for you, and do not transgress. Allah does not love those who transgress" [Maidah 5:87].
كنا نغزو مع رسول الله ﷺ ليس لنا نساء، فقلنا: ألا نستخصي؟ فنهانا عن ذلك. ثم رخص لنا أن ننكح المرأة بالثوب إلى أجل. ثم قرأ عبد الله {يأيها الذين ءامنوا لا تحرموا طيبت ما أحل الله لكم ولا تعتدوا إن الله لا يحب المعتدين} [سورة المائدة: ٨٧].
Bukhari narrated it in the Book of Marriage (5075) and Muslim in the Book of Marriage (11:1404), both through the route of Ismail (that is, Ibn Abu Khalid), from Qays, who said, I heard Abdullah say, and then he mentioned it. The wording given is that of Muslim. Bukhari's wording is similar, except that he did not say, "for a fixed term." Qays here is Ibn Abu Hazim.The meaning of the verse is that mutah was permissible and sanctioned in the early period of Islam for the reason mentioned by Ibn Masud. However, Tirmidhi (1122) pointed to another reason, which is what he narrated from Muhammad bin Ghaylan, who said, Sufyan bin Uqba, the brother of Qabisa bin Uqba, told us, Sufyan Thawri told us, from Musa bin Ubayda, from Muhammad bin Kaab, from Ibn Abbas, who said, mutah existed only in the early period of Islam. A man would arrive in a town where he had no acquaintances, so he would marry a woman for the period he expected to stay, and she would look after his belongings and take care of his affairs, until the verse was revealed, "except from their wives or those they rightfully possess" [Maarij 70:30]. Ibn Abbas said, "So every private part besides these two is forbidden." End of quote.Bayhaqi narrated it (7/205) through the route of Musa bin Ubayda with his chain, and in it the wording is, "and would take care of his affairs, until this verse was revealed, "forbidden to you are your mothers" [Nisa 4:23], to the end of the verse. So Allah abrogated the earlier one, and mutah was made forbidden. Its confirmation from the Quran is Allah's words, "except from their wives or those they rightfully possess" [Maarij 70:30], and any private part besides that is forbidden."However, its chain of transmission is daif because of Musa bin Ubayda, who is the Rabathi, whom the majority of scholars have declared daif. Tirmidhi said, "Only a small concession regarding mutah was narrated from Ibn Abbas, and he later retracted his statement when he reported from the Prophet ﷺ." This is evidence that Ibn Abbas returned to the view of the majority.