When you could ask for them to be punished
Said by the Prophet ﷺ at Ṭā'if, bleeding, after the town had driven him out with stones.
اللَّهُمَّ اغْفِرْ لِقَوْمِي فَإِنَّهُمْ لاَ يَعْلَمُونَ
Allāhumma-ghfir li-qawmī fa-innahum lā yaʿlamūn.
“O Allah, forgive my people, for they do not know.”
Where this comes from
The angel of the mountains was sent to him and offered to crush the town between two hills. He said no, and asked instead that their children might one day believe.
The full narration
Narrated `Abdullah:As if I saw the Prophet (ﷺ) talking about one of the prophets whose nation had beaten him and caused him to bleed, while he was cleaning the blood off his face and saying, "O Allah! Forgive my nation, for they have no knowledge
Source
Ṣaḥīḥ al-Bukhārī · 3477
Ṣaḥīḥ
- Agreed upon as authentic (al-Bukhārī / Muslim)