He said that in the period when the Qur'an was coming down they used to withdraw the penis.* * i.e. before emission of semen, to avoid conception. (Bukhari and Muslim.) Muslim added that the Prophet heard of that and did not prohibit it.
Hadith Referenceمشكوة المصابيح / كتاب النكاح / 3184
Hadith Gradingالألبانی:مُتَّفق عَلَيْهِ | زبیر علی زئی:صحيح
Hadith Takhrij´تحقيق و تخريج: محدث العصر حافظ زبير على زئي رحمه الله` «رواه مسلم (1440/138)»