Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:72:18

And ˹He revealed˺ that the masjids are for Allah, so do not invoke with Allah anyone.  

And ˹it has been revealed to me˺ that the places of prayer belong to God, so do not invoke, in them, anyone along with God, by associating others with Him, like the Jews and Christians do, who, when they enter their churches and temples, they ascribe partners to God.
القرآن:٧٢:١٨

وَأَنَّ الْمَسَاجِدَ لِلَّهِ فَلَا تَدْعُوا مَعَ اللَّهِ أَحَدًا  

{وأن المساجد} مواضع الصلاة {لله فلا تدعوا} فيها {مع الله أحدا} بأن تشركوا كما كانت اليهود والنصارى إذا دخلوا كنائسهم وبيعهم أشركوا.