Imamthrough his famous work “the combat with the self” sheds the light on the matter as following:
Because He favors His servants, God the Blessed and Supreme gave them intellect, He gave them the power to refine and purify themselves, He sent the prophets and awliya [the friends of God, saints, holy men] to guide people and to help them to reform themselves so that they do not fall into the severe chastisement of hell. If these preventatives do not cause the awareness and refinement of man, God, the Merciful, will make him aware through other means: by various difficulties, afflictions, poverty, and illness.
Like an expert physician or a skilled and kind nurse, He tries to cure a sick man from dangerous spiritual illnesses. If a servant is blessed by God, he will be faced with afflictions until he turns his attention to God the Almighty, and is refined. This is the way, and other than this there is no way, but man must tread this path with his own feet until he reaches its conclusion, Imam further explained.
If he does not reach any conclusion in this way, and the misled man is not cured, and he does not deserve the blessings of heaven, when his soul is drawn from him there will be much pressure on him, so perhaps he will return and be aware. Again, if he is not affected, then in the grave, in the world of barzakh, and in the terrible perilous events which take place after death, he will suffer pressures and chastisement until he becomes purified and refined, and he will not go to hell.
All of these are blessings from Almighty God to prevent man from going to hell. What then if with all these blessings and favors from Almighty God he is still not cured? Then there is no other alternative but the last cure, which is that he should be burned. How many a man has not refined and reformed himself and was not affected by these cures, so that he needed God, the Merciful, the Compassionate, to refine His servant by fire, just as gold must be purified in fire.
Regarding the ayah (verse)
“Living therein for ages” (Q 78:23)
It has been reported that the ‘ages’ mentioned here are for those who have been guided, those the basis of whose faith has been preserved. This is for me and you, if we are believers. Each age lasts for thousands of years, how many, only God knows. God forbid that we reach such a state that these cure are not effective, so that for deserving and meriting the everlasting blessings [of heaven] this final cure is required.
Read more articles:
Be apprehensive of your desires, Imam Khomeini explained