When the prayer ends
The Prophet ﷺ would say this immediately after giving salām.
اللَّهُمَّ أَنْتَ السَّلاَمُ وَمِنْكَ السَّلاَمُ تَبَارَكْتَ ذَا الْجَلاَلِ وَالإِكْرَامِ
Allāhumma anta-s-salām, wa minka-s-salām, tabārakta yā dha-l-jalāli wa-l-ikrām.
“O Allah, You are Peace, and from You comes peace. Blessed are You, Owner of Majesty and Honour.”
The full narration
Thauban reported:When the Messenger of Allah (ﷺ) finished his prayer. He begged forgiveness three times and said: O Allah! Thou art Peace, and peace comes from Thee; Blessed art Thou, O Possessor of Glory and Honour. Walid reported: I said to Auza'i: How is the seeking of forgiveness? He replied: You should say: I beg forgiveness from Allah, I beg forgiveness from Allah
Source
Ṣaḥīḥ Muslim · 1334
Ṣaḥīḥ
- Agreed upon as authentic (al-Bukhārī / Muslim)