Mahmud ibn Ghaylan reported from Sufyan ibn Uqbah (brother of Qabisah ibn Uqbah), from Sufyan Thawri, from Musa ibn Ubaydah, from Muhammad ibn Ka’b and he from lbn Abbas (RA) that he said, “Mutah was allowed in the beginning of Islam. If anyone travelled to a new place where he had no acquaintance then he took a wife there for as many days as he intended to stay there that she may take care of his property and serve him. This went on till this verse was revealed:
Except in regard to their spouses or those whom their right hands possess. Thereafter, all sexual relationships beside these two became forbidden.
--------------------------------------------------------------------------------