That he asked Ibn ʿAbbas, "Is there a prostration Surat-al-Saʿd?" (38.24) Ibn ʿAbbas said, "Yes," and then recited: "We gave...So follow their guidance." (6.85,90) Then he said, "He (David ) is one them (i.e. those prophets)." Mujahid narrated: I asked Ibn ʿAbbas (regarding the above Verse). He said, "Your Prophet (Muhammad) was one of those who were ordered to follow them."
نَعَمْ ثُمَّ تَلاَ {وَوَهَبْنَا} إِلَى قَوْلِهِ {فَبِهُدَاهُمُ اقْتَدِهْ} ثُمَّ قَالَ هُوَ مِنْهُمْ زَادَ يَزِيدُ بْنُ هَارُونَ وَمُحَمَّدُ بْنُ عُبَيْدٍ وَسَهْلُ بْنُ يُوسُفَ عَنِ الْعَوَّامِ عَنْ مُجَاهِدٍ قُلْتُ لاِبْنِ عَبَّاسٍ فَقَالَ نَبِيُّكُمْ ﷺ مِمَّنْ أُمِرَ أَنْ يَقْتَدِيَ بِهِمْ