No. Article 5 of the Law of Real Estate Ownership and Investment by Non-Saudis contains an explicit and firm restriction: non-Saudis may not hold ownership rights, easement rights, or benefit rights over real estate located within the city boundaries of Mecca or Medina. This prohibition applies regardless of whether the intended use is personal, commercial, or investment-related.
The only exception recognized under Article 5 is inheritance — meaning if a non-Saudi lawfully inherits property in these cities, that acquisition may be recognized. However, even inherited property in Mecca or Medina may be subject to specific rules, so legal advice is strongly recommended in such cases.
Notaries public and other competent bodies are legally barred under Article 6 from notarizing any transaction that contradicts this law, so any attempt to circumvent this restriction through a third party or informal arrangement would have no legal standing and could expose you to serious legal consequences. This restriction applies to all non-Saudis, regardless of religion or nationality.
This is general legal information, not legal advice. For advice on your specific situation, consult a lawyer licensed in Saudi Arabia.