[Machine] That Ka'b ibn al-Ashraf, the Jewish poet, used to mock the Messenger of Allah ﷺ and incite the disbelievers of the Quraysh against him in his poetry. When the Messenger of Allah ﷺ arrived in Medina, its people were a mixture of Muslims, who were united by the call of the Messenger of Allah ﷺ , polytheists who worshiped idols, and Jews who were the people of the fortresses and strongholds and were allies of Banu Aws and Banu Khazraj. The Messenger of Allah ﷺ wanted to reconcile with all of them, even if a person was a Muslim and his father was a polytheist or if a person was a Muslim and his brother was a polytheist. The polytheists and the Jews of Medina, upon the arrival of the Messenger of Allah ﷺ , harmed the Messenger of Allah ﷺ and his companions the most. Allah commanded His Messenger and the Muslims to have patience and forgive them. In this regard, Allah revealed the verse, "You will hear from those who were given the Scripture before you and from those who associate others with Allah much abuse. But if you are patient and fear Allah - indeed, that is of the matters [worthy] of determination" (Quran 3:186) until the end of the verse. In addition, Allah revealed the verse, "Many of the People of the Scripture wish they could turn you back to disbelief after you have believed, out of envy from themselves [even] after the truth has become clear to them. So pardon and overlook until Allah delivers His command. Indeed, Allah is over all things competent." (Quran 2:109) When Ka'b ibn al-Ashraf refused to stop harming the Messenger of Allah ﷺ and the Muslims, the Messenger of Allah ﷺ commanded Sa'd ibn Mu'adh to send a group to kill him. Sa'd ibn Mu'adh sent Muhammad bin Maslamah Ansari, Abu 'Abs Ansari, and Harith ibn 'Awf, along with five others. The hadith mentions their killing of Ka'b and the panic that spread among the Jews and the polytheists who were with them. They went to the Messenger of Allah ﷺ in the morning and said, "Our leader was killed last night, and he was one of our prominent leaders." The Messenger of Allah ﷺ reminded them of what he used to say in his poetry and warned them against it. The Messenger of Allah ﷺ invited them to make a written agreement between him, them, and the Muslims, which they would abide by. The Prophet ﷺ wrote a document between him, them, and the Muslims, valid for one year, which the Messenger of Allah ﷺ wrote under the date palm tree in the house of Bint al-Harith. That document remained with Ali ibn Abi Talib after the Messenger of Allah ﷺ .
أَنَّ كَعْبَ بْنَ الْأَشْرَفِ الْيَهُودِيَّ كَانَ شَاعِرًا وَكَانَ يَهْجُو رَسُولَ اللهِ ﷺ وَيُحَرِّضُ عَلَيْهِ كُفَّارَ قُرَيْشٍ فِي شِعْرِهِ وَكَانَ رَسُولُ اللهِ ﷺ قَدِمَ الْمَدِينَةَ وَأَهْلُهَا أَخْلَاطٌ مِنْهُمُ الْمُسْلِمُونَ الَّذِينَ تَجْمَعُهُمْ دَعْوَةُ رَسُولِ اللهِ ﷺ وَمِنْهُمُ الْمُشْرِكُونَ الَّذِينَ يَعْبُدُونَ الْأَوْثَانَ وَمِنْهُمُ الْيَهُودُ وَهُمْ أَهْلُ الْحَلْقَةِ وَالْحُصُونِ وَهُمْ حُلَفَاءُ لِلْحَيَّيْنِ الْأَوْسِ وَالْخَزْرَجِ فَأَرَادَ رَسُولُ اللهِ ﷺ حِينَ قَدِمَ الْمَدِينَةَ اسْتِصْلَاحَهُمْ كُلَّهُمْ وَكَانَ الرَّجُلُ يَكُونُ مُسْلِمًا وَأَبُوهُ مُشْرِكٌ وَالرَّجُلُ يَكُونُ مُسْلِمًا وَأَخُوهُ مُشْرِكٌ وَكَانَ الْمُشْرِكُونَ وَالْيَهُودُ مِنْ أَهْلِ الْمَدِينَةِ حِينَ قَدِمَ رَسُولُ اللهِ ﷺ يُؤْذُونَ رَسُولَ اللهِ ﷺ وَأَصْحَابَهُ أَشَدَّ الْأَذَى فَأَمَرَ اللهُ رَسُولَهُ وَالْمُسْلِمِينَ بِالصَّبِرِ عَلَى ذَلِكَ وَالْعَفْوِ عَنْهُمْ فَفِيهِمْ أَنْزَلَ اللهُ جَلَّ ثَنَاؤُهُ {وَلَتَسْمَعُنَّ مِنَ الَّذِينَ أُوتُوا الْكِتَابَ مِنْ قَبْلِكُمْ وَمَنَ الَّذِينَ أَشْرَكُوا أَذًى كَثِيرًا} [آل عمران 186] إِلَى آخِرِ الْآيَةِ وَفِيهِمْ أَنْزَلَ اللهُ جَلَّ ثَنَاؤُهُ {وَدَّ كَثِيرٌ مِنْ أَهْلِ الْكِتَابِ لَوْ يَرُدُّونَكُمْ مِنْ بَعْدِ إِيمَانِكُمْ كُفَّارًا حَسَدًا مِنْ عِنْدِ أَنْفُسِهِمْ مِنْ بَعْدِ مَا تَبَيَّنَ لَهُمُ الْحَقُّ فَاعْفُوا وَاصْفَحُوا} [البقرة 109] فَلَمَّا أَبَى كَعْبُ بْنُ الْأَشْرَفِ أَنْ يَنْزِعَ عَنْ أَذَى رَسُولِ اللهِ ﷺ وَأَذَى الْمُسْلِمِينَ أَمَرَ رَسُولُ اللهِ ﷺ سَعْدَ بْنَ مُعَاذٍ ؓ أَنْ يَبْعَثَ رَهْطًا لِيَقْتُلُوهُ فَبَعَثَ إِلَيْهِ سَعْدُ بْنُ مُعَاذٍ مُحَمَّدَ بْنَ مَسْلَمَةَ الْأَنْصَارِيَّ وَأَبَا عَبْسٍ الْأَنْصَارِيَّ وَالْحَارِثَ ابْنَ أَخِي سَعْدِ بْنِ مُعَاذٍ فِي خَمْسَةِ رَهْطٍ وَذَكَرَ الْحَدِيثَ فِي قَتْلِهِ قَالَ فَلَمَّا قَتَلُوهُ فَزِعَتِ الْيَهُودُ وَمَنْ كَانَ مَعَهُمْ مِنَ الْمُشْرِكِينَ فَغَدَوْا عَلَى رَسُولِ اللهِ ﷺ حِينَ أَصْبَحُوا فَقَالُوا إِنَّهُ طُرِقَ صَاحِبُنَا اللَّيْلَةَ وَهُوَ سَيِّدٌ مِنْ سَادَتِنَا فَقُتِلَ فَذَكَرَ لَهُمْ رَسُولُ اللهِ ﷺ الَّذِي كَانَ يَقُولُ فِي أَشْعَارِهِ وَيَنْهَاهُمْ بِهِ وَدَعَاهُمْ رَسُولُ اللهِ ﷺ إِلَى أَنْ يَكْتُبَ بَيْنَهُ وَبَيْنَهُمْ وَبَيْنَ الْمُسْلِمِينَ كِتَابًا يَنْتَهُوا إِلَى مَا فِيهِ فَكَتَبَ النَّبِيُّ ﷺ بَيْنَهُ وَبَيْنَهُمْ وَبَيْنَ الْمُسْلِمِينَ عَامًّا صَحِيفَةً كَتَبَهَا رَسُولُ اللهِ ﷺ تَحْتَ الْعَذْقِ الَّذِي فِي دَارِ بِنْتِ الْحَارِثِ فَكَانَتْ تِلْكَ الصَّحِيفَةُ بَعْدَ رَسُولِ اللهِ ﷺ عِنْدَ عَلِيِّ بْنِ أَبِي طَالِبٍ ؓ