Abdullah bin Masud reported,

We used to go on military campaigns with the Messenger of Allah ﷺ without our wives being with us, so we said, "Messenger of Allah, shall we not castrate ourselves?" He forbade us from doing so, then later permitted us to marry a woman in exchange for a garment for a fixed term.Then Abdullah recited, "You who believe, do not forbid the good things that Allah has made lawful for you, and do not transgress. Indeed, Allah does not love transgressors" [Maidah 5:87].

Ahmad 3986

Sahih

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

عن عبد الله قال

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

أحمد 3986صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Abdullah bin Masud
Numbering
Darussalam 3986
Ahmad 3986