When you have overdone it and lost ground
Said by those the Qur'an describes after a battle went badly.
وَمَا كَانَ قَوْلَهُمْ إِلَّآ أَن قَالُوا۟ رَبَّنَا ٱغْفِرْ لَنَا ذُنُوبَنَا وَإِسْرَافَنَا فِىٓ أَمْرِنَا وَثَبِّتْ أَقْدَامَنَا وَٱنصُرْنَا عَلَى ٱلْقَوْمِ ٱلْكَـٰفِرِينَ
Rabbana-ghfir lanā dhunūbanā wa isrāfanā fī amrinā wa thabbit aqdāmanā wa-nṣurnā ʿala-l-qawmi-l-kāfirīn.
And their words were not but that they said, "Our Lord, forgive us our sins and the excess [committed] in our affairs and plant firmly our feet and give us victory over the disbelieving people."
They ask forgiveness for their sins and for their excess, in the same breath, before asking for help. The order is not accidental.
Source
The Qur'an · 3:147
Qur'an
- Qur'anic text in the Uthmani script via Quran.com; translation: Saheeh International