as a place of worship even if no structure has been built upon it; for masājid is the plural of masjid, and a masjid is a place of prostration. Thus, this is broader in meaning than a constructed building.
Third: the underlying rationale is that praying in a graveyard may become a means leading to the worship of graves, or to imitating those who worship graves. Hence, since the disbelievers used to prostrate to the sun at its rising and setting, the Prophet ﷺ prohibited prayer at sunrise and sunset (1), lest this become a means leading to the worship of the sun besides Allah, or to imitating the disbelievers.
As for those who explain the reason for the prohibition of prayer in a graveyard as the fear that the graveyard may be impure, this is a feeble explanation—indeed, utterly lifeless.
They say: “Because it may be exhumed, and the pus of the dead may be present in it, contaminating the soil.” (2)
The response to this is as follows:
First: the basic assumption is that a graveyard has not been exhumed.
Second: who says that you will pray upon soil containing pus?
Third: who says that the pus of a deceased human being is impure?
Fourth: according to them, there is no distinction between an old graveyard and a newly established graveyard known not to have been exhumed. They are unable to answer all these points; thus, this line of reasoning is invalid.