Abdullah bin Masud reported,

We used to go on military campaigns with the Prophet ﷺ without our wives accompanying us, so we asked, "Should we castrate ourselves?" He forbade us from doing that, but later permitted us to contract a temporary marriage with a woman in exchange for a garment. Then he recited, "You who believe, do not forbid the good things that Allah has made lawful for you" [Maidah 5:87].

Bukhari 4615

Sahih

حدثنا عمرو بن عون حدثنا خالد عن إسماعيل عن قيس

عن عبد الله رضي الله عنه قال

كنا نغزو مع النبي ﷺ وليس معنا نساء فقلنا ألا نختصي فنهانا عن ذلك فرخص لنا بعد ذلك أن نتزوج المرأة بالثوب ثم قرأ {يا أيها الذين آمنوا لا تحرموا طيبات ما أحل الله لكم}

البخاري 4615صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Tafsir
Chapter
Do not prohibit the good things that Allah has made lawful for you
Numbering
Darussalam 4615
Bukhari 4615