From amongst these ayat is His statement,
“Allah puts forth an example of those who disbelieved: the wife of Nuh and the wife of Lut. They were under two of Our righteous servants but betrayed them, so these Prophets did not avail them from Allah at all, and it was said, ‘Enter the Fire with those who enter.’ And Allah puts forth an example of those who believed: the wife of Pharaoh, when she said, ‘My Lord, build for me a home near You in Paradise and save me from Pharaoh and his deeds and save me from the wrongdoing people.’ And (the example of) Mary, the daughter of Imran, who guarded her chastity, so We blew into (her garment) through Our angel, and she believed in the words of her Lord and His scriptures and was of the devoutly obedient.” (Surah al-Tahrim:10-12)
In these ayat, three examples were mentioned; one example of a disbeliever and two examples of believers. The example of the disbeliever explains how a disbeliever is blamed for disbelief and enmity to Allah, His Messenger and His supporters – and that neither his blood-relationship nor any relationship whatsoever he has with believers will benefit him due to his disbelief. Indeed, all connections and relations are nullified on the Day of Judgement, except the relationships established by Allah alone, through His Messengers. For indeed, if blood-relationships or affinity would benefit anyone who disbelieved, then it would have helped and benefitted the wives of the the two Prophets Nuh and Lut – Thus, when their relationship could not avail them from Allah at all, it was said to them, “Enter the Fire with those who enter.” Consequently, this ayah stopped those who disobey Allah from hoping to benefit from their relationship with pious people regardless of how close this relationship was in this life. There is no stronger and closer bond than Prophethood, parenthood and spousal relationships, yet neither could Nuh avail his son from Allah nor could Ibrahim avail his father from Allah and nor could Nuh and Lut avail their wives from Allah.
“Neither your relatives nor your children will benefit you on the Day of Resurrection (against Allah). He will judge between you. And Allah is the All-Seer of what you do.” (Surah al-Mumtahinah:3)
“(It will be) the day when no person shall have power (to do) anything for another, and the Decision, that Day, will be (wholly) with Allah.” (Surah al-Infitar:19)
“And fear a Day (of Judgement) when a person shall not avail another…” (Surah al-Baqarah:48)
“O mankind, fear your Lord and fear a day when no father will avail his son, not will a son avail his father at all.” (Surah Luqman:33)
In these ayat, Allah clearly nullifies the false hopes of disbelievers who left Allah and clutched onto others, be it a relative or a companion, hoping that such a relationship will benefit them on the Day of Judgement or provide them with refuge from the punishment of Allah; or even intercede for them. This false hope is actually the main reason behind the misguidance and idol worship of the sons of Adam, which is the form of idolatry that Allah does not forgive. He revealed His Books to nullify it and sent Messengers to show enmity towards the idolaters and to fight them.
As for the two examples of believers; one of them is the example of the wife of Firawn (Pharaoh), wherein Allah established that the relations of a believer with a disbeliever in this life does not harm him so long he disavows himself from the disbelief and sin of the disbeliever – this is because the sins of a disobedient people never harm obedient ones in the Hereafter, and when he is harmed due to it in this worldly life, it is only because the punishment imposed upon the people of the earth is general when they disobey Allah. The wife of Firawn was not harmed despite her relationship with him though he was the worst of disbelievers. And the wives of Nuh and Lut did not benefit from their spousal relationship though they were married to Messengers of Allah.
The second example is that of Maryam who had no believing or disbelieving husband. And from these examples we have three kinds of women; a disbelieving woman who has a spousal relationship with believing man, a believing woman who has a spousal relationship with a disbelieving man, and a believing woman who has no spousal relationship at all.
These examples contain marvellous secrets that match the context of the Surah, for they were revealed addressing the wives of the Prophet, peace and blessings of Allah be upon him, and warning them from cooperating with each other against him. For if they did not obey Allah and His Messenger, peace and blessings of Allah be upon him, and seek the reward of the Hereafter, then (they need to know) their marriage to the Prophet, peace and blessings of Allah be upon him, would not bring them any benefit, just like the wives of Nuh and Lut did not benefit from their marriages to them. This is why in this Surah, the example was limited to spousal relationships without mentioning the blood-relations.
Yahya ibn Sallam said: Allah mentioned the first example warning Aishah and Hafsah, then He mentioned the second example encouraging them to hold fast to the obedience of Allah and His Messenger. The example of Maryam was to show that though she was the noble, chosen and pure woman, she was exposed to false accusation from enemies of Allah (the jews) towards herself and her son (Jesus) and attribution to them what Allah declared them innocent from, yet all these accusation did not defame them in sight of Allah. Thus when a pious man does good deeds, all the false accusations of sinners and disbelievers against him are harmless. In this example was solace for Aishah, the mother of the believers, as this Surah was revealed after the incident of al-Ifk (The great lie that was attributed to her, which Allah freed her from).
The examples in these ayat addressing the wives of the Prophet, peace and blessings of Allah be upon him, contain warnings, admonitions, encouragement (to do good deeds) and consulation (for those who have been hurt by the words of others). Nonetheless, the secrets of Revelation and more supreme and honourable than all that we have mentioned, particularly the examples that only those with a sound intellect can comprehend.
Paragons of the Qur’an by Ibn Qayyim al Jawziyyah Pages 105-110