It is narrated from Ubayy bin Ka'b (may Allah be pleased with him) that he said: In the beginning of Islam, the use of water (i.e., performing ghusl) was required only upon the emission of semen, but later this was abandoned, and the command for ghusl was given merely upon the joining of the private parts.
Hadith Referenceمسند الإمام الشافعي / كتاب الطهارة / 101
Hadith Takhrijاخرجہ ابوداؤد الطهارة، باب في الاكسال (214)، (215) - والترمذی، الطهارة، باب ماجاء أن الماء من الماء: (10) (111)- وقال حسن صحيح و ابن ماجہ، الطهارة، باب ماجاء في وجوب الغسل اذا التقى الختانان (609) وصححہ ابن الجارود (91) وابن خزيمة (225, 226) وابن حبان (1166, 1170)