مَن كَفَرَ بِاللَّهِ مِن بَعْدِ إِيمَانِهِ إِلَّا مَنْ أُكْرِهَ وَقَلْبُهُ مُطْمَئِنٌّ بِالْإِيمَانِ وَلَٰكِن مَّن شَرَحَ بِالْكُفْرِ صَدْرًا فَعَلَيْهِمْ غَضَبٌ مِّنَ اللَّهِ وَلَهُمْ عَذَابٌ عَظِيمٌ
“Whoever disbelieves in Allah after their belief — not those who are forced while their hearts are firm in faith, but those who embrace disbelief wholeheartedly — they will be condemned by Allah and suffer a tremendous punishment.”
This is the exact verse the event's own account cites: revealed to clarify that Ammar ibn Yasir RA's forced words under torture did not count against him, since his heart remained firm in faith.