Abdul Rahman bin al-Harith bin Abdullah bin Ayyash (may Allah have mercy on him) said: Al-Qasim bin Muhammad bin Abi Bakr (may Allah have mercy on him) told me that the verse "It is not for a believer to kill a believer except by mistake" [Surah al-Nisa: 92] was revealed concerning your grandfather Ayyash bin Abi Rabi'ah and al-Harith bin Zayd, the brother of Banu Ma'is (may Allah be pleased with them both). He used to harm them in Makkah while he was in the state of polytheism. When the Companions (may Allah be pleased with them) emigrated, al-Harith (may Allah be pleased with him) also became Muslim, but the Muslims did not know of his Islam. He emigrated towards Madinah, and he had only just reached Banu Amr bin Awf when Ayyash (may Allah be pleased with him) met him on the way. He thought him to be still a polytheist, took his sword and killed him. So Allah Almighty revealed this verse: Free a believing slave, and if his heirs are from a hostile people while he himself is a believer, do not give his blood money to them. And "if he was from a people between whom and you there is a covenant" [Surah al-Nisa: 92] means the people of protection (ahl al-dhimmah): then freeing a believing slave and blood money handed over to his family.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب القسامة / 16473