One night, the Messenger of Allah ﷺ prayed in the mosque, and a group of people prayed along with him. The following night he prayed again, and more people joined him. Then they gathered on the third or fourth night, but the Messenger of Allah ﷺ did not come out to them.In the morning he said, "I saw what you did, and nothing kept me from coming out to you except that I feared it would be made obligatory upon you."This took place during Ramadan.
أخبرنا قتيبة عن مالك عن ابن شهاب عن عروة
أن رسول الله ﷺ صلى في المسجد ذات ليلة وصلى بصلاته ناس ثم صلى من القابلة وكثر الناس ثم اجتمعوا من الليلة الثالثة أو الرابعة فلم يخرج إليهم رسول الله ﷺ فلما أصبح قال قد رأيت الذي صنعتم فلم يمنعني من الخروج إليكم إلا أني خشيت أن يفرض عليكم وذلك في رمضان
Bukhari narrated it in Tahajjud, chapter on the Prophet's ﷺ urging of standing in prayer at night, hadith 1129, and Muslim in Prayer of Travelers, chapter on encouragement to stand in prayer during Ramadan, which is tarawih, hadith 761, from the hadith of Malik through this same chain. It is also found in Muwatta (Yahya), 1/113, and in Kubra, hadith 1297.