Sayyiduna Abu Hurayrah (may Allah be pleased with him) said: We were present with the Prophet (peace and blessings be upon him) at Khaybar, and he (peace and blessings be upon him) said about a man who claimed to be a Muslim: "This one is in the Fire." When the fighting began, he fought very valiantly, and the people, seeing his courage, said to the Prophet (peace and blessings be upon him): O Messenger of Allah! The one about whom you said that he is of the people of Hell has fought very bravely and is badly wounded. He (peace and blessings be upon him) said: "He is of the people of Hell." The people fell into doubt. Then they saw that this man, who was badly wounded, took out his arrow and killed himself with it. The Muslims hurried to the Prophet (peace and blessings be upon him) and said: Allah has proven your word true, O Messenger of Allah! Allah tested him, and he killed himself. So he (peace and blessings be upon him) ordered Sayyiduna Bilal (may Allah be pleased with him) to announce among the people: "None but a believer will enter Paradise, and Allah has supported His religion through a wicked man."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب المرتد / 16834