Mishkat al-Masabih 2435
وَعَنِ ابْنِ عُمَرَ قَالَ: كَانَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ إِذَا وَدَّعَ رَجُلًا أَخَذَ بِيَدِهِ فَلَا يَدَعُهَا حَتَّى يَكُونَ الرَّجُلُ هُوَ يَدَعُ يَدَ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ وَيَقُولُ: «أَسْتَوْدِعُ اللَّهَ دِينَكَ وَأَمَانَتَكَ وَآخِرَ عَمَلِكَ» وَفِي رِوَايَة «خَوَاتِيم عَمَلِكَ» . رَوَاهُ التِّرْمِذِيُّ وَأَبُو دَاوُدَ وَابْنُ مَاجَهْ وَفِي روايتهما لم يذكر: «وَآخر عَمَلك»
From Ibn ʿUmar, who said: When the Prophet ﷺ bade farewell to a man, he would take his hand and not let go of it until the man himself let go of the hand of the Prophet ﷺ, and he would say: "I entrust to Allah your religion, your trust and the last of your deeds." In a narration: "the final outcomes of your deeds." Reported by at-Tirmidhi, Abu Dawud and Ibn Majah, and in the narration of the two of them he did not mention: "and the last of your deeds."