The Holy Prophet told him not to worry and advised him to...
The Holy Prophet told him not to worry and advised him to repeat those words if the infidels again asked him to do so. And it was not only the Holy Prophet who liked the choice of ‘Ammar (r.a.) Even Allah confirmed his action in the verse quoted above. This event is mentioned in almost all books of Tafsir, under this verse. For example: Tafseer Ad -Durru ‘l-Manthur oflmam as-Suyuti. vol.4 , p. 132 Tafseer Al-Kashshaf of az-Zamakhshari, Beirut ed. vol. 2. p. 430 Tafseer Kabir oflmam ar-Razi.
Say: whether you conceal what is in your hearts or manifest it, Allah knows it; and He knows all that is in the heavens and all that is in the earth; and verily Allah has power over all things.” [^2] The reason of this permission is given in this very ayat: “Say whether you conceal what is in your hearts or manifest it, Allah knows it”.
Here Allah assures the Muslims that Faith is a spiritual thing, connected with heart; and if your faith inside your heart is unimpaired, then Allah is pleased with you whether you manifest that faith or hide it. It is all the same with Allah, because He knows your hidden secrets, and even when you hide your faith from unbelievers, Allah knows it and recognizes it. There are other verses too; but we do not want to spend much time on this topic here. Now some statements from the books of Tafseer.