The Messenger of Allah ﷺ prayed in the masjid one night, and some people followed his prayer. Then he prayed the following night and more people came. Then they gathered on the third or fourth night and the Messenger of Allah ﷺ did not come out to them. When morning came he said: "I saw what you did, and nothing prevented me from coming out to you but the fact that I feared that this would be made obligatory for you," and that was in Ramadan. (Using translation from Nasāʾī 1604)
أَنَّ رَسُولَ اللَّهِ ﷺ صَلَّى فِي الْمَسْجِدِ ذَاتَ لَيْلَةٍ فَصَلَّى بِصَلَاتِهِ نَاسٌ ثُمَّ صَلَّى مِنَ الْقَابِلَةِ فَكَثُرَ النَّاسُ ثُمَّ اجْتَمَعُوا مِنَ اللَّيْلَةِ الثَّالِثَةِ أَوِ الرَّابِعَةِ فَلَمْ يَخْرُجْ لَهُمْ رَسُولُ اللَّهِ ﷺ فَلَمَّا أَصْبَحَ قَالَ «قَدْ رَأَيْتُ الَّذِي صَنَعْتُمْ فَلَمْ يَمْنَعْنِي مِنَ الْخُرُوجِ إِلَيْكُمْ إِلَّا أَنِّي خَشِيتُ أَنْ تُفْرَضَ عَلَيْكُمْ» وَذَلِكَ فِي رَمَضَانَ