Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:16854Abū ʿAbdullāh al-Ḥāfiẓ > Abū al-ʿAbbās Muḥammad b. Yaʿqūb > Muḥammad b. Isḥāq > Aḥmad b. ʿĪsá > ʿAbdullāh b. Wahb > al-Layth b. Saʿd > ʿAbd Rabbih b. Saʿīd > Ibn Shihāb

[Machine] I heard Ibn Shihab say, "If the heretic denies [his beliefs] and clear evidence is presented against him, then he is to be killed. But if he confesses and repents, then he is spared from being killed."  

البيهقي:١٦٨٥٤أَخْبَرَنَا أَبُو عَبْدِ اللهِ الْحَافِظُ ثنا أَبُو الْعَبَّاسِ مُحَمَّدُ بْنُ يَعْقُوبَ ثنا مُحَمَّدُ بْنُ إِسْحَاقَ ثنا أَحْمَدُ بْنُ عِيسَى ثنا عَبْدُ اللهِ بْنُ وَهْبٍ عَنِ اللَّيْثِ بْنِ سَعْدٍ عَنْ عَبْدِ رَبِّهِ بْنِ سَعِيدٍ قَالَ

سَمِعْتُ ابْنَ شِهَابٍ يَقُولُ الزِّنْدِيقُ إِنْ هُوَ جَحَدَ وَقَامَتْ عَلَيْهِ الْبَيِّنَةُ فَإِنَّهُ يُقْتَلُ وَإِنْ جَاءَ هُوَ مُعْتَرِفًا تَائِبًا فَإِنَّهُ يُتْرَكُ مِنَ الْقَتْلِ