The verse 156 contains the last portion of the prayer. It said: وَاكْتُبْ لَنَا فِي هَـٰذِهِ الدُّنْيَا حَسَنَةً وَفِي الْآخِرَةِ إِنَّا هُدْنَا إِلَيْكَ “ And write for us good in this world and in this world and in the Hereafter. We turn to you in repentance." Allah Almighty answered in response to this request: عَذَابِي أُصِيبُ بِهِ مَنْ أَشَاءُ ۖ وَرَحْمَتِي وَسِعَتْ كُلَّ شَيْءٍ ۚ فَسَأَكْتُبُهَا لِلَّذِينَ يَتَّقُونَ وَيُؤْتُونَ الزَّكَاةَ وَالَّذِينَ هُم بِآيَاتِنَا يُؤْمِنُونَ
"As for My punishment, I afflict with it whom I will. And My Mercy extends to everything. So I shall write it for those who fear, and pay Zakah and those who do believe in Our verses".
That is, though all the disobedient deserve the punishment of Allah but out of His mercy, which encircles everything, even the wrath of Allah, He afflicts with His punishment only a few whom He wills. His mercy is as great as includes everything, even those who rebel Allah and deny Him are shown some of His mercy, though it is limited to this world alone. When His mercy is so covering that it includes even the disobedient, He will surely write it for those who deserve it by fearing Allah, paying Zakah and by believing in His verses. Then the Prophet Musa (علیہ السلام) was given the good news of its acceptance.
The Commentators have varied opinion about the above interpretation of this prayer. This verse has no indication of the acceptance of his prayer in clear words as in other cases the approval of his prayers has been clearly mentioned. For example, the approval of his prayer has been mentioned in these words at another occasion (20:36): قَدْ أُوتِيتَ سُؤْلَكَ يَا مُوسَىٰ “ O Musa you are given what you asked for_" It is mentioned in another verse (10:89) أُجِيبَت دَّعْوَتُكُمَا (0! Musa and Harun) your prayer has been accepted." At this occasion (7:156), no mention of such approval has been made. Some commentators have, therefore, suggested that this prayer of the Prophet Musa (علیہ السلام) was not accepted in favour (علیہ السلام) of the Israelites, rather, it was accepted in favour of the Muslim Ummah. The author of Ruh al-Ma'ani has, however, said it to be a remote possibility.
The correct interpretation, therefore, is that the Prayer of the Prophet Musa (علیہ السلام) was comprised of two requests. The first was of mercy and forgiveness for those who were punished, and second for writing the good for him and his people both in this world and in the Hereafter. The acceptance of the first request is mentioned in this verse while the answer to the second request has been mentioned in the next verse (157). In response to his first request he was told that Allah does not punish everyone who acts sinfully. He punishes only a few whom He will for their transgression. Therefore these people also shall not be punished. His Mercy is as great as covers every creation of Allah. Even those who are punished are not completely deprived of His mercy, since they could get harder punishment than they got. Allah has all the powers to do everything He wills.
The Satan claimed that according to this verse he was also the subject of His mercy because His mercy is said to be extending to everything and he was one of 'everything.'
My teacher, the Sheikh Anwar Kashmiri has said that this verse has indicated that His mercy can encircle everything. It did not say that His mercy shall encircle everything. In another verse of the Holy Qur'an it has been said in more clear words:
فَإِن كَذَّبُوكَ فَقُل رَّبُّكُمْ ذُو رَحْمَةٍ وَاسِعَةٍ وَلَا يُرَدُّ بَأْسُهُ عَنِ الْقَوْمِ الْمُجْرِمِينَ ﴿147﴾
"If they disbelieve in you say: 'Your Lord has all encompassing mercy; but His punishment cannot be warded off from the evil-doers-6:147."
This has made it clear that vastness of His mercy does not preclude the sinners from being punished by Him.
In short, the first part of the invocation of the Prophet Musa (علیہ السلام) in favour of these people for mercy and forgiveness was instantly granted, but the second part asking for writing the perfect favour of Allah both in this world and in the Hereafter was stipulated with certain conditions. That is, as far as this world is concerned Allah can
make His mercy common to all without regard to their belief or disbelief, but the Hereafter is a distinct world where His Mercy shall be limited only to those who fulfill certain conditions. Firstly, those who fear Allah and take to piety that is, they fulfill all their religious obliga-tions and avoid things forbidden by Allah, and pay Zakah regularly out of their earnings, and thirdly, those who, firmly believe in His verses without offering any pretences or false interpretations to them. If these people too, fulfill the above conditions, the perfect favour shall be written for them both in this world and in the Hereafter.
The next verse, however, has indicated that people who shall perfectly fit the above description will be those coming after them in the last age, and follow the last Prophet ﷺ ، consequently deserving perfect Mercy or favour of Allah. According to the report of Qatadah cited above, the Satan claimed that he also deserves the Mercy of Allah, for His Mercy extends to everything but the condition of 'Iman (belief) etc. specified in the verse excluded him. Similarly, the Jews and the Christians claimed that they too believed in Allah and paid Zakah, therefore, they shall also get the perfect Mercy of in the worlds. The next verse, however, included the condition of belief in the last Prophet ﷺ and in the verses of the Qur'an. This has excluded the Jews and the Christians who did not believe in the Holy Prophet ﷺ .