We gave (in the past) knowledge to David and Solomon: and they both said: "Praise be to Allah Who has favored us above many of His servants who believe!" 3252 3253
Cf. xxi. 78-82. "Knowledge" means such knowledge as leads up to the higher things in life, the Wisdom that was shown in their decisions and judgments, and the understanding that enabled them to fulfil their mission in life. They were both just men and prophets of Allah. The Bible, as we have it, is inconsistent: on the one hand it calls David "a man after God's own heart" (I Samuel, xiii. 14, and Acts xiii. 22); and the Christians acclaim Christ as a son of David; but on the other hand, horrible crimes are ascribed to him, which, if he had committed them, would make him a monster of cruelty and injustice. About Solomon, too, while he is described as a glorious king, there are stories of his lapses into sin and idolatry. The Muslim teaching considers them both to be men of piety and wisdom, and high in spiritual knowledge.
They ascribed, as was proper, their knowledge, wisdom, and power to the only true Source of all good, Allah.