Muhammad bin Ka'b narrates from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that mut'ah was at the beginning of Islam, and they used to recite this verse: "So for whatever you enjoy of them, give them their due compensation." [Surah al-Nisa': 24]. When a man came to a town where he was not known, he would marry there until he had finished his need, so that his belongings would be looked after and his affairs kept in order, until this verse was revealed: "Prohibited to you are your mothers." [Surah al-Nisa': 23]. Allah abrogated the first ruling, and so mut'ah was excluded, and its confirmation is in the Qur'an: "Except from their wives or those their right hands possess." [Surah al-Mu'minun: 6]. Every private part other than these is unlawful.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النكاح / 14168