وَلَقَدْ كَانُوا۟ عَـٰهَدُوا۟ ٱللَّهَ مِن قَبْلُ لَا يُوَلُّونَ ٱلْأَدْبَـٰرَ ۚ وَكَانَ عَهْدُ ٱللَّهِ مَسْـُٔولًا Qur’an Al-Ahzab (33:15)Walaqad kanoo AAahadoo Allaha min qablu la yuwalloona aladbara wakana AAahdu Allahi masoolan
Apparently, after the battle of Uhud, certain men who had then shown cowardice were forgiven on undertaking that they would behave better next time. A solemn promise made to the Messenger of Allah is a promise to Allah, and it cannot be broken with impunity.