Abdullah bin Abbas (may Allah be pleased with them both) narrates: A man from the Ansar became Muslim, then he became an apostate and joined the polytheists. Then he felt regret and sent a message to his people, saying: Ask the Prophet (peace and blessings of Allah be upon him) whether there is any room for repentance for me? The narrator says: Then this verse was revealed: "How shall Allah guide a people who disbelieved after their belief and after they had borne witness that the Messenger is true and clear proofs had come to them?" The verse continues: "Except for those who repent thereafter and reform, for indeed Allah is Forgiving and Merciful." So his people sent him the message, and he accepted Islam.
Hadith Referenceصحیح ابن حبان / كتاب الحدود / 4477
Hadith Gradingفضيلة الشيخ الإمام محمد ناصر الدين الألبانيصحيح - «الصحيحة» (3066).فضيلة الشيخ العلّامة شُعيب الأرناؤوطإسناده صحيح