The Messenger of Allah ﷺ said: Do not deprive women of their share of the mosques, when they seek permission from you. Bilal said: By Allah, we would certainly prevent them. 'Abdullah said: I say that the Messenger of Allah ﷺ said it and you say: We would certainly prevent them! (Using translation from Muslim 442h)
قَالَ رَسُولُ اللهِ ﷺ «لَا تَمْنَعُوا النِّسَاءَ حُظُوظَهُنَّ مِنَ الْمَسَاجِدِ إِذَا اسْتَأْذَنَّكُمْ» فَقَالَ بِلَالٌ وَاللهِ لَنَمْنَعُهُنَّ فَقَالَ عَبْدُ اللهِ يَا عَدُوَّ اللهِ أَقُولُ قَالَ رَسُولُ اللهِ ﷺ وَتَقُولُ لَنَمْنَعُهُنُّ