The Prophet (ﷺ) said, "Who is ready to kill Ka`b bin Al-Ashraf who has really hurt Allah and His
Apostle?" Muhammad bin Maslama said, "O Allah's Messenger (ﷺ)! Do you like me to kill him?" He replied
in the affirmative. So, Muhammad bin Maslama went to him (i.e. Ka`b) and said, "This person (i.e.
the Prophet) has put us to task and asked us for charity." Ka`b replied, "By Allah, you will get tired of
him." Muhammad said to him, "We have followed him, so we dislike to leave him till we see the end
of his affair." Muhammad bin Maslama went on talking to him in this way till he got the chance to kill
him.
Sahih al-Bukhari Book 56, Hadith 238