وَعنهُ كُنَّا نَعْزِلُ وَالْقُرْآنُ يَنْزِلُ
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 (sallallahu alayhi wa sallam) heard of that and did not prohibit it.
Mishkat al-Masabih 3057, Book 14, Marriage, Hadith 102. 1 min read