with them and grant them His pleasure—that they deliberately sought out these places for supplication and prayer. Rather, they went only to Allah’s mosques. Indeed, they did not even seek out mosques built contrary to Islamic law, such as the mosque built to cause harm, concerning which Allah said:
“And those who established a mosque to cause harm, promote disbelief, divide the believers, and provide an outpost for those who had previously fought against Allah and His Messenger—they will surely swear, ‘We intended nothing but good.’ But Allah bears witness that they are certainly liars.”
“Never stand in prayer there. A mosque founded on piety from the first day is more worthy of your standing in prayer there. In it are men who love to purify themselves, and Allah loves those who purify themselves.”
Furthermore, prayer is not permissible in mosques built over the graves of prophets and righteous people, and building them is forbidden, as several leading scholars have explicitly stated. This is because it is widely reported from the Prophet, may Allah bless him and grant him peace, in the Sahīh, Sunan, and Musnad collections that he said:
“Those before you used to take graves as places of worship. Beware! Do not take graves as places of worship, for I forbid you to do so.”
During his final illness, he said:
“May Allah’s curse be upon the Jews and Christians: they took the graves of their prophets as places of worship.”
He was warning against what they had done. ʿĀ’ishah said, “Were it not for that, his grave would have been left exposed.” But he disliked the prospect of its being made a place of worship.
The chamber of the Prophet, may Allah bless him and grant him peace, was outside his mosque. When al-Walīd ibn ʿAbd al-Malik was ruler, he wrote to ʿUmar ibn ʿAbd al-ʿAzīz