Short answer
It is haram and the penalty depends on when it happened. In the Hanafi school, intercourse in Hajj before the stand at Arafah spoils the Hajj; after Arafah but before shaving, the Hajj stays valid but a camel or cow is due. In umrah, before four rounds of tawaf it spoils the umrah.
Intercourse in Hajj before the wuquf at Arafah spoils the Hajj: the couple complete the rites, each owes a dam, and the Hajj must be made up. After Arafah and before shaving it requires a badanah and the Hajj is valid. In umrah, before four rounds of tawaf it spoils the umrah, requiring a dam and a make-up; after that, a dam only.
Other madhhabs
- Shafi'i
- Intercourse before the first release from ihram spoils the Hajj even if it was after Arafah, and requires a camel.
- Hanbali
- Intercourse before the first release from ihram spoils the Hajj even after Arafah, and requires a camel.
- Maliki
- Intercourse before the stoning of Jamrat al-Aqabah and the tawaf al-ifadah on the day of sacrifice spoils the Hajj.
Explanation
The Quran says that in Hajj there is "no sexual relations". The four schools agree that intercourse is the most serious violation of ihram. They differ on the point after which it no longer spoils the Hajj: the Hanafis take the stand at Arafah as that point, the other schools the first release from ihram on the day of sacrifice.
Hanafi details for Hajj:
- Before Arafah: the Hajj is spoiled. Both must still finish all its rites, each owes a sheep or goat, and both must perform Hajj again later. Scholars advise them to stay apart during the make-up Hajj.
- After Arafah, before shaving: the Hajj is valid; a badanah (camel or cow) is due.
- After shaving but before the fard tawaf: a sheep or goat.
For umrah: before completing four rounds of tawaf, the umrah is spoiled; finish it, give a dam and do it again. After four rounds but before shaving, a dam only.
Kissing or touching with desire without intercourse requires a dam in the Hanafi school, whether or not there was ejaculation, and does not spoil the Hajj.
Forgetting or not knowing does not change these penalties in the Hanafi school. A wife who was forced owes no sin, though the rites are still affected. The details of each case vary, so speak to a mufti, and make sincere tawbah (repentance).
Ask a mufti about your own case. This answer explains the general ruling. When the details of your situation matter, as they do here, ask a qualified mufti and give them the full facts. Where to ask a scholar.
The evidence
Quran, Surah Al-Baqara 2:197
ٱلْحَجُّ أَشْهُرٌۭ مَّعْلُومَٰتٌۭ ۚ فَمَن فَرَضَ فِيهِنَّ ٱلْحَجَّ فَلَا رَفَثَ وَلَا فُسُوقَ وَلَا جِدَالَ فِى ٱلْحَجِّ ۗ وَمَا تَفْعَلُوا۟ مِنْ خَيْرٍۢ يَعْلَمْهُ ٱللَّهُ ۗ وَتَزَوَّدُوا۟ فَإِنَّ خَيْرَ ٱلزَّادِ ٱلتَّقْوَىٰ ۚ وَٱتَّقُونِ يَٰٓأُو۟لِى ٱلْأَلْبَٰبِ ﴿١٩٧﴾
Hajj is [during] well-known months, so whoever has made Hajj obligatory upon himself therein [by entering the state of ihram], there is [to be for him] no sexual relations and no disobedience and no disputing during Hajj. And whatever good you do - Allah knows it. And take provisions, but indeed, the best provision is fear of Allah. And fear Me, O you of understanding.
Intercourse is forbidden in ihram.
Where the ruling is recorded
- al-Hidaya, Kitab al-Hajj, bab al-jinayat, fasl on intercourse. Before Arafah it spoils the Hajj; after it, a badanah.
- Bada'i al-Sana'i, Kitab al-Hajj, on what spoils Hajj. The Hanafi reasoning and the make-up.
- al-Mughni (Ibn Qudama), Kitab al-Hajj, on intercourse in ihram. The Hanbali view that it spoils Hajj before the first release.
This answer is pending review by the scholars on our team. Quran translation by Sahih International. Hadith Arabic from the standard editions of the six books and the Muwatta, with gradings as recorded there; the English is our own rendering. Spotted a mistake? Tell us.