قَالَ رَبِّ إِنِّي ظَلَمْتُ نَفْسِي فَاغْفِرْ لِي فَغَفَرَ لَهُ (He said, "0 my Lord, I have wronged myself, so forgive me." So he forgave him - 28:16). The gist of this verse is that Sayyidna Musa (علیہ السلام) regarded the killing of the infidel Qibti as a sin, despite the fact that it had happened without any intention on his part, because it was in conflict with his status of prophethood, and thus below his dignity. So, he begged Allah's pardon for the act, which was duly granted.
The first question that arises here is that this Qibti was an infidel combatant (harbi) in the religious term. Hence, his killing was permissible and preferable, because he was neither a dhimmi (ذِمِّی), i.e the citizen of an Islamic state nor under any covenant with Musa (علیہ السلام) . Then why did Sayyidna Musa (علیہ السلام) regarded it a sin and an act of Shaitan? His killing should have been regarded as an act worth the reward, because the Qibti was harming a Muslim unjustly, and got killed in the process when Musa (علیہ السلام) tried to save the life of the Muslim. The answer to this question is that covenants of peace are sometimes written or spoken in express words, and sometimes they come into effect by consistent practice of the parties that amounts to an implied agreement and is as good as a written covenant. Violation of the covenants of this type is also prohibited in Islam. The covenant established by practice can be understood by the example that if in a non-Islamic state Muslims and non-Muslims are living in harmony and there is no conflict between them, and any pillage or fighting with each other is regarded as treachery, then this consistent practice of co-existence would be regarded as an implied agreement for peaceful living, and its violation is not allowed. The proof of this principle can be found in a lengthy hadith of Sayyidna Mughirah Ibn Shu'bah that has been reported by Imam Bukhari in his book in the chapter entitled as kitab Ash-Shurut. The hadith runs like this: Sayyidna Mughirah Ibn Shu` bah had good relations with a group of infidels before the advent of Islam, and later he killed them and took possession of all their wealth. Then he went to the Holy Prophet ﷺ I and submitted to Islam, and presented all that wealth to him. On this action the Holy Prophet ﷺ said to him امّا الاسلام فاقبل و امّ المال فلست منہ فی شٰٔی (As far as your embracing Islam is concerned, I accept it, but I have nothing to do with this wealth ) Abu Dawud has quoted this hadith like this: امّا المال فمال غدر لا حاجۃ لنا فیہ (As for wealth, we have no concern with it). The Holy Prophet ﷺ declared in this hadith that he accepted his submission to Islam, but this wealth has been snatched by breach of trust and was a treachery, hence he did not have any desire for this wealth. Hafiz Ibn Hajar has observed in his commentary that this hadith has laid down the principle that grabbing of wealth of the infidels during peacetime is not permissible. It is for the simple reason that people living together in a city or township or those who work together regard themselves secured from each other. The agreement established through their practice is like a trust, which must be honoured by each and every person, no matter whether he is a Muslim or an infidel. The property of infidels permitted for possession by the Muslims is only that which is acquired during a war with them. It is not permitted to grab the wealth of infidels during peacetime, when one feels secured from one another. Qastalani has observed in his commentary on Bukhari as follows:
انّ اموال المشرکین ان کانت مغنومۃ عند القھر فلا یحل اخذھا عند الامن، فاذا کان الانسان مضاحباً لھم فقد امن کل واحد منھم صاحبہ، فسفک الدّماء و اخذ المال مع ذٰلک غدر حرام الا ان ینبذ الیھم عھدھم علٰی سواء
` No doubt the wealth of infidels is permitted (to take possession) during war or jihad, but in peacetime it is not lawful. Therefore, any Muslim living and socializing with infidels in the manner that they are safe and secure for each other, for him it is unlawful to slay them, or forcefully grab their wealth, unless the peace agreement established through practice is abrogated through an announcement'.
The gist of the discussion is that if the Qibti would have been killed with preconceived resolve in the presence of an implied peace agreement, it would not have been lawful. But Musa did not have the intention of killing the Qibti. He only hit him with his bare hands to save the Isra'illi from his grip. In the normal course, it should not have been fatal, but he died all the same by that blow. Then Musa ~JI realized that a lighter blow would also have done the job of getting rid of him. Realizing that harder blow was not needed, he repented and invoked Allah's mercy.
Special Note
The above principle was explained to me by Sayyidi Maulana Ashraf Thanivi (رح) when I was writing the commentary of Surah Al-Qasas in Ahkamul-Qur'an, the Arabic commentary written under his supervision. It is the last academic discourse of Sayyidi from which I have benefited, as he had completed this work on Rajab 2, 1362 A.H, and after that his sickness intensified and on Rajab 16, 1362, he passed away. إِنَّا لِلَّـهِ وَإِنَّا إِلَيْهِ رَاجِعُونَ
Some commentators have observed that although killing of the Qibti was permissible, but prophets take extra care in special cases even in performing permissible acts and avoid them, unless they receive a cue from Allah Ta` ala. On this occasion Sayyidna Musa (علیہ السلام) did not wait for the permission from Allah Ta’ ala and acted on his own. Therefore, in view of his status as a prophet, he maintained that it was a sin on his part, and hence, invoked Allah's pardon. (Ruh)