The Messenger of Allah ﷺ said, "Do not prevent the female servants of Allah from attending the mosques of Allah."
حدثنا يحيى عن عبيد الله أخبرني نافع
قال رسول الله ﷺ لا تمنعوا إماء الله مساجد الله
No references are available.
Its isnad is sahih. Malik related it in Muwatta 1:202-203 in disconnected form, that it reached him from Abdullah bin Umar. Bukhari related it 2:318-319 at length and connected, by way of Abu Usama, from Ubaydullah bin Umar, from Nafi.Muslim related it 1:129, both abridged and at length as it appears here, by way of Ibn Numayr and Ibn Idris, from Ubaydullah. Something similar in meaning has already passed at 4522 and 4556. The word "he said" is an addition found in [manuscript] K.