Muwatta Imam Malik Book of The Qibla, Hadith 15
Yahya related to me from Malik from Yahya ibn Said from Amra bint Abd ar-Rahman that A'isha, the wife of the Prophet ﷺ said, "If the Messenger of Allah ﷺ had seen what women do now, he would have forbidden them to go into the mosques, just as the women of the Bani Israil were forbidden."
Yahya ibn Said said that he asked Amra, "Were the women of the Bani Israil forbidden to go into the mosques?" and she said, "Yes."
وَحَدَّثَنِي عَنْ مَالِكٍ، عَنْ يَحْيَى بْنِ سَعِيدٍ، عَنْ عَمْرَةَ بِنْتِ عَبْدِ الرَّحْمَنِ، عَنْ عَائِشَةَ، زَوْجِ النَّبِيِّ ﷺ أَنَّهَا قَالَتْ لَوْ أَدْرَكَ رَسُولُ اللَّهِ ﷺ مَا أَحْدَثَ النِّسَاءُ لَمَنَعَهُنَّ الْمَسَاجِدَ كَمَا مُنِعَهُ نِسَاءُ بَنِي إِسْرَائِيلَ . قَالَ يَحْيَى بْنُ سَعِيدٍ فَقُلْتُ لِعَمْرَةَ أَوَمُنِعَ نِسَاءُ بَنِي إِسْرَائِيلَ الْمَسَاجِدَ قَالَتْ نَعَمْ .