{O David, indeed We have made you a successor upon the earth}, up to His saying: {and will lead you astray from the way of God}, meaning: passion will make you slip away from the obedience of God in judgment, and that is without disbelief. {Indeed, those who go astray from the way of God will have a severe punishment for having forgotten the Day of Account}, meaning: they abandoned it and did not believe in it. Interpretation of verses 27 through 29 of Surah Sad.
﴿يَا دَاوُدُ إِنَّا جَعَلْنَاكَ خَلِيفَةً فِي الأَرْض﴾ إِلَى قَوْله: ﴿فَيُضِلَّكَ عَنْ سَبِيلِ الله﴾ يَعْنِي: فيستزلّك الْهوى عَن طَاعَة اللَّه فِي الحكم، وَذَلِكَ من غير كُفْرٍ ﴿إِنَّ الَّذِينَ يَضِلُّونَ عَنْ سَبِيلِ اللَّهِ لَهُمْ عَذَابٌ شَدِيدٌ بِمَا نَسُوا يَوْمَ الْحِسَابِ﴾ أَي: تَرَكُوهُ وَلم يُؤمنُوا بِهِ. تَفْسِير الْآيَات من ٢٧ وَحَتَّى ٢٩ من سُورَة ص.