Sunan at-Tirmithiy كتاب الصلاة باب ما جاء فى وقت المغرب

حَدَّثَنَا عَلِىُّ بْنُ حُجْرٍ حَدَّثَنَا إِسْمَاعِيلُ بْنُ إِبْرَاهِيمَ عَنْ لَيْثٍ عَنْ عَبْدِ اللَّهِ بْنِ الْحَسَنِ عَنْ أُمِّهِ فَاطِمَةَ بِنْتِ الْحُسَيْنِ عَنْ جَدَّتِهَا فَاطِمَةَ الْكُبْرَى قَالَتْ كَانَ رَسُولُ اللَّهِ صلى الله عليه وسلم إِذَا دَخَلَ الْمَسْجِدَ صَلَّى عَلَى مُحَمَّدٍ وَسَلَّمَ وَقَالَ رَبِّ اغْفِرْ لِى ذُنُوبِى وَافْتَحْ لِى أَبْوَابَ رَحْمَتِكَ. وَإِذَا خَرَجَ صَلَّى عَلَى مُحَمَّدٍ وَسَلَّمَ وَقَالَ رَبِّ اغْفِرْ لِى ذُنُوبِى وَافْتَحْ لِى أَبْوَابَ فَضْلِكَ.
Whenever the Messenger of God, peace and blessings of God be upon him, entered the mosque he invoked peace and blessings upon Muḥammad and said, "My Lord, forgive me my sins and open for me the doors of Your mercy ." Whenever he came out, he invoked peace and blessings upon Muḥammad and said, "My Lord, forgive me my sins and open for me the doors of Your bounty."
(1) Muḥammad and the 'Messenger of God' peace and blessings of God be upon him, are the same person.