Sahih
Al Bukhari
صحيح البخاري
Actions while Praying
كتاب العمل فى الصلاة
Chapter 18: Thinking of something during As-Salat (the prayer)
باب تَفَكُّرِ الرَّجُلِ الشَّىْءَ فِي الصَّلاَةِ
Sahih Al Bukhari 1221
Narrated `Uqba bin Al-Harith
I offered the `Asr prayer with the Prophet (ﷺ) and after finishing the prayer with Taslim he got up quickly and went to some of his wives and then came out. He noticed the signs of astonishment on the faces of the people caused by his speed. He then said, "I remembered while I was in my prayer that a piece of gold was Lying in my house and I disliked that it should remain with us throughout the night, and so I have ordered it to be distributed."
حَدَّثَنَا إِسْحَاقُ بْنُ مَنْصُورٍ، حَدَّثَنَا رَوْحٌ، حَدَّثَنَا عُمَرُ ـ هُوَ ابْنُ سَعِيدٍ ـ قَالَ أَخْبَرَنِي ابْنُ أَبِي مُلَيْكَةَ، عَنْ عُقْبَةَ بْنِ الْحَارِثِ ـ رضى الله عنه ـ قَالَ صَلَّيْتُ مَعَ النَّبِيِّ صلى الله عليه وسلم الْعَصْرَ، فَلَمَّا سَلَّمَ قَامَ سَرِيعًا دَخَلَ عَلَى بَعْضِ نِسَائِهِ، ثُمَّ خَرَجَ وَرَأَى مَا فِي وُجُوهِ الْقَوْمِ مِنْ تَعَجُّبِهِمْ لِسُرْعَتِهِ فَقَالَ " ذَكَرْتُ وَأَنَا فِي الصَّلاَةِ تِبْرًا عِنْدَنَا، فَكَرِهْتُ أَنْ يُمْسِيَ أَوْ يَبِيتَ عِنْدَنَا فَأَمَرْتُ بِقِسْمَتِهِ ".