An Arabi said to the Messenger of Allah ﷺ, "When is the Hour?"The Messenger of Allah ﷺ replied, "What have you prepared for it?"He said, "Love of Allah and His Messenger."The Prophet ﷺ said, "You will be with those you love."
أن أعرابيا قال لرسول الله ﷺ: متى الساعة؟ فقال له رسول الله ﷺ: ما أعددت لها قال: حب الله ورسوله. قال: أنت مع من أحببت.
Muslim reported it in the Book of Righteousness and Kinship (2639) from Abdullah bin Maslama bin Qanab, who said, Malik related to us, from Ishaq bin Abdullah bin Abu Talha, from Anas, and he mentioned it. I did not find it in the Muwatta, and Jawhari did not mention it in Musnad Muwatta.Bukhari reported it in the Book of Rulings (7153), and Muslim also reported it, both from the hadith of Jareer, from Mansur, from Salim bin Abu Jaad, who said, Anas bin Malik related to us and said, "While I was walking with the Prophet ﷺ, the two of us leaving the masjid, we met a man at the threshold of the masjid who said, 'O Messenger of Allah, when is the Hour?' The Prophet said, 'What have you prepared for it?' The man seemed to fall silent, then he said, 'O Messenger of Allah, I have not prepared for it much fasting, nor prayer, nor charity, but I love Allah and His Messenger.' He said, 'You will be with whoever you love.'"In another version reported by Bukhari (3688), Anas said, "We were never so happy about anything as we were about the statement of the Prophet ﷺ, 'You will be with whoever you love.'" Anas said, "So I love the Prophet ﷺ, and Abu Bakr, and Umar, and I hope that I will be with them because of my love for them, even though I have not done deeds like theirs."