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.
أَنَّ رَسُولَ اللَّهِ ﷺ صَلَّى فِي الْمَسْجِدِ ذَاتَ لَيْلَةٍ وَصَلَّى بِصَلاَتِهِ نَاسٌ ثُمَّ صَلَّى مِنَ الْقَابِلَةِ وَكَثُرَ النَّاسُ ثُمَّ اجْتَمَعُوا مِنَ اللَّيْلَةِ الثَّالِثَةِ أَوِ الرَّابِعَةِ فَلَمْ يَخْرُجْ إِلَيْهِمْ رَسُولُ اللَّهِ ﷺ فَلَمَّا أَصْبَحَ قَالَ قَدْ رَأَيْتُ الَّذِي صَنَعْتُمْ فَلَمْ يَمْنَعْنِي مِنَ الْخُرُوجِ إِلَيْكُمْ إِلاَّ أَنِّي خَشِيتُ أَنْ يُفْرَضَ عَلَيْكُمْ وَذَلِكَ فِي رَمَضَانَ