Allaah will forgive him even if he was one who fled during the advance of an army
أَسْتَغْفِرُ اللهَ الَّذِي لَا إِلَهَ إلَّا هُوَ الحَيُّ القَيّوُمُ وأَتُوبُ إِلَيهِ
‘Astaghfirullah al-Adheemal-lathee laa ‘ilaaha ‘illaa Huwal Hayyul Qayyoomu wa ‘atoobu ‘ilayhi.
‘I seek the forgiveness of Allah the Mighty, Whom there is none worthy of worship except Him, the Living, the Self-Subsisting and Supporter of all, and I turn to Him in repentance.’
Allaah will forgive him even if he was one who fled during the advance of an army.’
Abu Dawud 2/85, At-Tirmidhi 5/569
Al-Albanee Sahih t-Tirmidhi 3/182