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:22:25

Indeed, those who have disbelieved and avert ˹people˺ from the way of Allah and ˹from˺ al-Masjid al-Haram, which We made for the people - equal are the resident therein and one from outside; and ˹also˺ whoever intends ˹a deed˺ therein of deviation ˹in religion˺ or wrongdoing - We will make him taste of a painful punishment.  

Truly those who disbelieve, and who bar from the way of God, ˹from˺ obedience to Him, and, from, the Sacred Mosque, which We have assigned, as a ˹holy˺ rite and a place of devotion, for mankind, equally for the dweller, the one who resides, therein and the visitor, the passer-by; and whoever seeks ˹to commit˺ sacrilege therein (the bā’ ˹of bi-ilhādin, ‘sacrilege’˺ is extra) by doing wrong, in other words, for such a reason, committing what is forbidden, even if he should curse the ˹Mosque’s˺ attendant, We shall make him taste a painful chastisement, that is, some such ˹chastisement˺ (from this ˹last clause˺ one may derive the predicate of ˹the introductory particle˺ inna, ‘truly’, and it is this: ‘We shall make them taste a painful chastisement’.
القرآن:٢٢:٢٥

إِنَّ الَّذِينَ كَفَرُوا وَيَصُدُّونَ عَنْ سَبِيلِ اللَّهِ وَالْمَسْجِدِ الْحَرَامِ الَّذِي جَعَلْنَاهُ لِلنَّاسِ سَوَاءً الْعَاكِفُ فِيهِ وَالْبَادِ ۚ وَمَنْ يُرِدْ فِيهِ بِإِلْحَادٍ بِظُلْمٍ نُذِقْهُ مِنْ عَذَابٍ أَلِيمٍ  

{إن الذين كفروا ويصدون عن سبيل الله} طاعته {و} عن {المسجد الحرام الذي جعلناه} منسكا ومتعبدا {للناس سواءً العاكف} المقيم {فيه والباد} الطارئ {ومن يرد فيه بإلحاد} الباء زائدة {بظلم} أي بسببه بأن ارتكب منهيا، ولو شتم الخادم {نذقه من عذاب أليم} مؤلم: أي بعضه، ومن هذا يؤخذ خبر إن: أي نذيقهم من عذاب أليم.