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:9:109

Then is one who laid the foundation of his building on righteousness ˹with fear˺ from Allah and ˹seeking˺ His approval better or one who laid the foundation of his building on the edge of a bank about to collapse, so it collapsed with him into the fire of Hell? And Allah does not guide the wrongdoing people.  

Is he who founded his building upon fear of God and, in hope of, beatitude, from Him, better, or he who founded his building upon the brink, the edge, of a bank, an overhang, that is crumbling, about to collapse (read juruf or jurf) so that it toppled with him, so that it collapsed ˹taking˺ with it the one who built it, into the fire of Hell?: ˹this is˺ an excellent similitude for building upon that which constitutes the opposite of fear of God and ˹for˺ what it leads to; the interrogative is meant as an affirmative: in other words, the former is the better, which is the likeness of the ˹building of the˺ mosque of Qubā’, while the latter is the likeness of the mosque of ‘harm’ (masjid al-dirār). And God guides not the evildoing folk.
القرآن:٩:١٠٩

أَفَمَنْ أَسَّسَ بُنْيَانَهُ عَلَىٰ تَقْوَىٰ مِنَ اللَّهِ وَرِضْوَانٍ خَيْرٌ أَمْ مَنْ أَسَّسَ بُنْيَانَهُ عَلَىٰ شَفَا جُرُفٍ هَارٍ فَانْهَارَ بِهِ فِي نَارِ جَهَنَّمَ ۗ وَاللَّهُ لَا يَهْدِي الْقَوْمَ الظَّالِمِينَ  

{أفمن أسَّس بنيانه على تقوى} مخافة {من الله} رجاء {ورضوان} منه {خيرٌ أم من أسَّس بنيانه على شفا} طرف {جُرُفِ} بضم الراء وسكونها، جانب {هارِ} مشرف على السقوط {فانهار به} سقط مع بانيه {في نار جهنم} خير تمثيل لبناء على ضد التقوى بما يؤول إليه، والاستفهام للتقرير، أي الأول خير وهو مثال مسجد قباء، والثاني مثال مسجد الضرار {والله لا يهدي القوم الظالمين}.