I heard Jabir bin Abdullah say, "During the time of the Messenger of Allah ﷺ and Abu Bakr, we used to contract temporary marriage for a handful of dates or flour for a number of days, until Umar forbade it in connection with the case of Amr bin Hurayth."
سمعت جابر بن عبد الله يقول: كنا نستمتع بالقبضة من التمر والدقيق الأيام على عهد رسول الله ﷺ وأبي بكر، حتى نهى عنه عمر في شأن عمرو بن حريث.
Muslim narrated it in the Book of Marriage (16:1405) from Muhammad bin Rafi, who said, Abdul-Razzaq narrated to us, who said, Ibn Jurayj informed us, who said, Abu Zubayr informed me, and he related it.The story of Amr bin Hurayth is what Abdul-Razzaq related (14029) from Ibn Jurayj, who said, Abu Zubayr informed me that he heard Jabir bin Abdullah say, Amr bin Hurayth came from Kufa and contracted a mutah marriage with a freedwoman. She was brought before Umar while she was pregnant. He questioned her, and she said, "Amr bin Hurayth contracted a mutah marriage with me." So he questioned him, and he told him about it plainly. Umar said, "Why didn't you marry someone else?" That was when he forbade it.