Hadith on Jihad: No harm to people in religious buildings

Thabit ibn al-Hajjaj reported: Abu Bakr, may Allah be pleased with him, stood up among the people and praised and thanked Allah, then he said, “No doubt, do not kill the monk in the monastery.”

Ibn Taymiyyah said, “The majority of scholars say monks are not killed (during war) unless they are among those who assist in fighting in its entirety; otherwise they are (immune) like women and children.”

Source: Muṣannaf Ibn Abī Shaybah 32425

عَنْ ثَابِت بْن الْحَجَّاجِ الْكِلَابِيّ قَالَ قَامَ أَبُو بَكْرٍ رضي الله عنه فِي النَّاسِ فَحَمِدَ اللَّهَ وَأَثْنَى عَلَيْهِ ثُمَّ قَالَ أَلَا لَا يُقْتَلُ الرَّاهِبُ فِي الصَّوْمَعَةِ

قال ابن تيمية فَالْجُمْهُورُ يَقُولُونَ لَا يُقْتَلُ إلَّا مَنْ كَانَ مِنْ الْمُعَاوِنِينَ لَهُمْ عَلَى الْقِتَالِ فِي الْجُمْلَةِ وَإِلَّا كَانَ كَالنِّسَاءِ وَالصِّبْيَانِ

32425 مصنف ابن أبي شيبة كتاب الجهاد باب ما ينهى عن قتله في دار الحرب