أَخْبَرَنَا الشَّافِعِيُّ رَضِيَ اللَّهُ عَنْهُ، قَالَ: أَخْبَرَنَا غَيْرُ وَاحِدٍ مِنْ ثِقَاتِ أَهْلِ الْعِلْمِ، عَنْ هِشَامِ بْنِ عُرْوَةَ، عَنْ أَبِيهِ، عَنْ أَبِي أَيُّوبَ الْأَنْصَارِيِّ، عَنْ أُبَيِّ بْنِ كَعْبٍ، قَالَ: قُلْتُ: يَا رَسُولَ اللَّهِ، إِذَا جَامَعَ أَحَدُنَا فَأَكْسَلَ؟ فَقَالَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: "يَغْسِلْ مَا مَسَّ الْمَرْأَةَ مِنْهُ، وَلْيَتَوَضَّأْ ثُمَّ لِيُصَلِّ" .
It is narrated from Ubayy bin Ka'b (may Allah be pleased with him), he states: I asked, "O Messenger of Allah (ﷺ)! When one of us has intercourse and withdraws before ejaculation, what should he do?" The Prophet (ﷺ) said: "He should wash the part that touched the woman, then perform ablution and then offer prayer."