The Story of David and Solomon, peace be upon them both.
They were among the greatest prophets raised among the Children of Israel, and Allah combined in each of them prophethood, wisdom, and a mighty, well-established kingdom.
As for David—blessings and peace be upon him—he was one of the soldiers serving under Saul (Talut), whom a prophet of the Children of Israel had appointed king over them because of his bravery, physical strength, and skill in statecraft and military organization, as the Almighty says: “And He increased him abundantly in knowledge and stature” (2:247).
When they met Goliath and his forces, Saul’s army held firm and sought help from Allah. David outstripped them all with exceptional courage: he personally killed their king, Goliath, the enemy ranks were routed, and Allah granted the Children of Israel that victory.
Allah then made David a prophet and endowed him with wisdom and a strong kingdom, as He says: “We strengthened his kingdom and bestowed upon him wisdom and decisive speech” (38:20). Allah had also gifted him with strength in worship and penetrating insight, and He described him with the two qualities that perfect a servant when He said: “Be patient over what they say, and remember Our servant David, the possessor of strength; indeed, he was always turning [to God]” (38:17). Thus He praised him for great power in fulfilling Allah’s commands and for constant penitence born of his deep knowledge of Allah.
Allah, Exalted is He, subjugated the birds and the mountains so that they glorified Allah along with him. He was granted a melodious, resonant voice such as no human being had ever been given. He would sleep for half the night and stand in worship for a third of it.