Answered by Ustadh Tabraze Azam
Question: Assalam alaykum
Usually the doors of mosques were unlocked. Why?
Answer: Assalamu alaikum wa rahmatullah,
Classically, it was disliked (makruh) to lock the doors of the mosque because it was deemed akin to preventing the general public from prayer.
Allah Most High says, “Who does more wrong than those who prevent Allah’s Name from being mentioned in His places of worship.” [2:114]
But if there is a fear of theft of mosque property, particularly in our times, there is no harm is locking the doors outside the times of prayer. The detailing of how this is applied within a specific context would return to those who look after the affairs of the mosque.
[Haskafi, al-Durr al-Mukhtar, with Ibn ‘Abidin’s Gloss; Mawsili, al-Ikhtiyar li Ta‘lil al-Mukhtar]
Please also see this answer.
And Allah Most High alone knows best.
[Ustadh] Tabraze Azam
Checked and Approved by Shaykh Faraz Rabbani
Ustadh Tabraze Azam holds a BSc in Computer Science from the University of Leicester, where he also served as the President of the Islamic Society. He memorised the entire Qur’an in his hometown of Ipswich at the tender age of sixteen, and has since studied the Islamic Sciences in traditional settings in the UK, Jordan and Turkey. He is currently pursuing advanced studies in Jordan, where he is presently based with his family.