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:38:26

˹We said˺, "O David, indeed We have made you a successor upon the earth, so judge between the people in truth and do not follow ˹your own˺ desire, as it will lead you astray from the way of Allah." Indeed, those who go astray from the way of Allah will have a severe punishment for having forgotten the Day of Account.  

‘O David! We have indeed made you a vicegerent on the earth, managing the affairs of people; so judge justly between people and do not follow desire, that is, the desires of the soul, that it then lead you astray from the way of God, that is to say, from the proofs that indicate ˹the truth of˺ His Oneness. Truly those who go astray from the way of God, in other words, from belief in God — for them there will be a severe chastisement because of their forgetting the Day of Reckoning’, as a result of their having neglected faith. For had they been certain of ˹the truth of˺ the Day of Reckoning, they would have ˹first˺ been believers in this world.
القرآن:٣٨:٢٦

يَا دَاوُودُ إِنَّا جَعَلْنَاكَ خَلِيفَةً فِي الْأَرْضِ فَاحْكُمْ بَيْنَ النَّاسِ بِالْحَقِّ وَلَا تَتَّبِعِ الْهَوَىٰ فَيُضِلَّكَ عَنْ سَبِيلِ اللَّهِ ۚ إِنَّ الَّذِينَ يَضِلُّونَ عَنْ سَبِيلِ اللَّهِ لَهُمْ عَذَابٌ شَدِيدٌ بِمَا نَسُوا يَوْمَ الْحِسَابِ  

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