Ka’ab bin Malik who was one of those whose repentance was accepted said “Ka’ab bin Al Ashraf used to satire the Prophet ﷺ and incited the infidels of the Quraish against him. When the Prophet ﷺ came to Madeena, its people were intermixed, some of them were Muslims and others polytheists aho worshipped idols and some were Jews. They used to hurt the Prophet ﷺ and his Companions. Then Allaah Most High commanded His Prophet to show patience and forgiveness. So Allaah revealed about them “And ye shall certainly hear much that will grieve you from those who receive Book before you”. When Ka’ab bin Al Ashraf refused to desist from hurting the Prophet ﷺ the Prophet ﷺ ordered Sa’d bin Mu’adh to send a band to kill him. He sent Muhammad bin Maslamah and mentioned the story of his murder. When they killed him, the Jews and the polytheist were frightened. Next day they came to the Prophet ﷺ and said “Our Companions were attacked and night and killed.” The Prophet ﷺ informed them about that which he would say. The Prophet ﷺ then called them so that he could write a deed of agreement between him and them and they should fulfill its provisions and desist from hurting him. He then wrote a deed of agreement between him and them and the Muslims in general.”
عَنْ أَبِيهِ وَكَانَ أَحَدَ الثَّلاَثَةِ الَّذِينَ تِيبَ عَلَيْهِمْ وَكَانَ كَعْبُ بْنُ الأَشْرَفِ يَهْجُو النَّبِيَّ ﷺ وَيُحَرِّضُ عَلَيْهِ كُفَّارَ قُرَيْشٍ وَكَانَ النَّبِيُّ ﷺ حِينَ قَدِمَ الْمَدِينَةَ وَأَهْلُهَا أَخْلاَطٌ مِنْهُمُ الْمُسْلِمُونَ وَالْمُشْرِكُونَ يَعْبُدُونَ الأَوْثَانَ وَالْيَهُودُ وَكَانُوا يُؤْذُونَ النَّبِيَّ ﷺ وَأَصْحَابَهُ فَأَمَرَ اللَّهُ ﷻ نَبِيَّهُ بِالصَّبْرِ وَالْعَفْوِ فَفِيهِمْ أَنْزَلَ اللَّهُ { وَلَتَسْمَعُنَّ مِنَ الَّذِينَ أُوتُوا الْكِتَابَ مِنْ قَبْلِكُمْ } الآيَةَ فَلَمَّا أَبَى كَعْبُ بْنُ الأَشْرَفِ أَنْ يَنْزِعَ عَنْ أَذَى النَّبِيِّ ﷺ أَمَرَ النَّبِيُّ ﷺ سَعْدَ بْنَ مُعَاذٍ أَنْ يَبْعَثَ رَهْطًا يَقْتُلُونَهُ فَبَعَثَ مُحَمَّدَ بْنَ مَسْلَمَةَ وَذَكَرَ قِصَّةَ قَتْلِهِ فَلَمَّا قَتَلُوهُ فَزِعَتِ الْيَهُودُ وَالْمُشْرِكُونَ فَغَدَوْا عَلَى النَّبِيِّ ﷺ فَقَالُوا طُرِقَ صَاحِبُنَا فَقُتِلَ فَذَكَرَ لَهُمُ النَّبِيُّ ﷺ الَّذِي كَانَ يَقُولُ وَدَعَاهُمُ النَّبِيُّ ﷺ إِلَى أَنْ يَكْتُبَ بَيْنَهُ وَبَيْنَهُمْ كِتَابًا يَنْتَهُونَ إِلَى مَا فِيهِ فَكَتَبَ النَّبِيُّ ﷺ بَيْنَهُ وَبَيْنَهُمْ وَبَيْنَ الْمُسْلِمِينَ عَامَّةً صَحِيفَةً