Temporary marriage existed at the beginning of Islam. A man would arrive in a town where he had no acquaintances, so he would marry a woman for the length of time he expected to stay. She would safeguard his belongings and look after his affairs. This continued until the verse was revealed, "Except from their wives or those their right hands possess" [Muminun 23:6].Ibn Abbas said, "Any private part beyond these two is forbidden."
حدثنا محمود بن غيلان حدثنا سفيان بن عقبة أخو قبيصة بن عقبة حدثنا سفيان الثوري عن موسى بن عبيدة عن محمد بن كعب
إنما كانت المتعة في أول الإسلام كان الرجل يقدم البلدة ليس له بها معرفة فيتزوج المرأة بقدر ما يرى أنه يقيم فتحفظ له متاعه وتصلح له شيئه حتى إذا نزلت الآية {إلا على أزواجهم أو ما ملكت أيمانهم} قال ابن عباس فكل فرج سوى هذين فهو حرام
No references are available.
[Its chain is daif]. Bayhaqi transmitted it, 7/205–206, from the hadith of Sufyan bin Uqbah through the same chain. Musa bin Ubayda is daif.