Anas bin Malik reported,

While we were sitting with the Prophet ﷺ in the mosque, a man came in riding a camel. He made the camel kneel in the mosque, tied it up, and then asked the people, "Which of you is Muhammad?"The Prophet ﷺ was reclining among them, so we said, "This white man who is reclining."The man said to him, "Son of Abdul-Muttalib?"The Prophet ﷺ replied, "I have answered you."The man said to the Prophet ﷺ, "I am going to ask you, and I will be firm in my questioning, so do not hold it against me."He said, "Ask whatever you wish."The man said, "I ask you by your Lord and the Lord of those before you, has Allah sent you to all people?"He answered, "By Allah, yes."The man said, "I adjure you by Allah, has Allah commanded you that we pray the five prayers in the day and night?"He answered, "By Allah, yes."The man said, "I adjure you by Allah, has Allah commanded you that we fast this month of the year?"He answered, "By Allah, yes."The man said, "I adjure you by Allah, has Allah commanded you to take this charity from our wealthy and distribute it among our poor?"The Prophet ﷺ answered, "By Allah, yes."The man then said, "I believe in what you have brought, and I am the messenger of those of my people behind me. I am Dimam bin Thalaba, of the tribe of Banu Saad bin Bakr."

Azami 3110

Sahih

عن أنس بن مالك يقول

بينما نحن جلوس مع النبي ﷺ المسجد، دخل رجل على جمل، فأناخه في المسجد ثم عقله، ثم قال لهم: أيكم محمد؟ والنبي ﷺ متكئ بين ظهرانيهم، فقلنا: هذا الرجل الأبيض المتكي، فقال له الرجل: ابن عبد المطلب؟ فقال له النبي ﷺ: (قد أجبتك). فقال الرجل للنبي ﷺ: إني سائلك فمشدد عليك في المسألة، فلا تجد علي في نفسك. فقال: (سل عما بدا لك). فقال: أسألك بربك ورب من قبلك، الله أرسلك إلى الناس كلهم؟ فقال: (اللهم نعم). قال: أنشدك بالله، الله أمرك أن نصلي الصلوات الخمس في اليوم والليلة؟ قال: (اللهم نعم). قال: أنشدك بالله، الله أمرك أن نصوم هذا الشهر من السنة؟ قال: (اللهم نعم). قال: أنشدك بالله، الله أمرك أن تأخذ هذه الصدقة من أغنيائنا فتقسمها على فقرائنا؟ فقال النبي ﷺ: (اللهم نعم). فقال الرجل: آمنت بما جنت به، وأنا رسول من ورائي من قومي، وأنا ضمام بن ثعلبة، أخو بني سعد بن بكر.

الأعظمي 3110صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Mosques
Section
Polytheist entering the masjid out of necessity
Numbering
Jami al-Kamil 3110 (2nd edition)
Azami 3110