In Surah Nahl, "whoever disbelieves in Allah after having believed, except one who is compelled" up to His words, "and for them is a great punishment" [Nahl 16:106]. This was then abrogated in part, and an exception was made from it, for He said, "Then indeed your Lord, to those who emigrated after they had been persecuted and then struggled and were patient, indeed your Lord, after that, is Forgiving and Merciful" [Nahl 16:110].This refers to Abdullah bin Saad bin Abu Sarh, who later governed Egypt. He used to write for the Messenger of Allah ﷺ, but Satan made him slip and he went over to the disbelievers. The Prophet ordered that he be put to death on the day of the conquest, but Uthman bin Affan sought protection for him, and the Messenger of Allah ﷺ granted it.
أخبرنا زكريا بن يحيى قال حدثنا إسحق بن إبراهيم قال أنبأنا علي بن الحسين بن واقد قال أخبرني أبي عن يزيد النحوي عن عكرمة
في سورة النحل {من كفر بالله من بعد إيمانه إلا من أكره} إلى قوله {لهم عذاب عظيم} فنسخ واستثنى من ذلك فقال {ثم إن ربك للذين هاجروا من بعد ما فتنوا ثم جاهدوا وصبروا إن ربك من بعدها لغفور رحيم} وهو عبد الله بن سعد بن أبي سرح الذي كان على مصر كان يكتب لرسول الله ﷺ فأزله الشيطان فلحق بالكفار فأمر به أن يقتل يوم الفتح فاستجار له عثمان بن عفان فأجاره رسول الله ﷺ
[Its chain of transmission is hasan] Abu Dawud narrated it, in the Book of Legal Punishments, chapter on the ruling concerning one who apostatizes, hadith no. 4358, from the hadith of Ali bin Husayn, transmitted through him, and it is found in Al-Kubra, hadith no. 3532.