Anas bin Malik reported,

The Messenger of Allah ﷺ was praying one night in his chamber when some of his companions came and joined him in prayer. He shortened the prayer, then entered the house, then came out again. He did this several times, each time praying and then withdrawing.When morning came, they said, "Messenger of Allah, we prayed with you last night, and we would have loved for you to lengthen your prayer."He replied, "I knew you were there, and I did that on purpose."

Ahmad 13065

Sahih

حدثنا يزيد أنبأنا حميد

عن أنس

أن رسول الله ﷺ كان ذات ليلة يصلي في حجرته فجاء أناس من أصحابه فصلوا بصلاته فخفف ثم دخل البيت ثم خرج ففعل ذلك مرارا كل ذلك يصلي وينصرف فلما أصبح قالوا يا رسول الله صلينا معك البارحة ونحن نحب أن تمد في صلاتك فقال قد علمت بمكانكم وعمدا فعلت ذلك

أحمد 13065صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Anas bin Malik
Numbering
Darussalam 13065
Ahmad 13065