Al-Baqarah 2:251
فَهَزَمُوهُم بِإِذْنِ اللَّهِ وَقَتَلَ دَاوُودُ جَالُوتَ وَآتَاهُ اللَّهُ الْمُلْكَ وَالْحِكْمَةَ وَعَلَّمَهُ مِمَّا يَشَاءُ ۗ وَلَوْلَا دَفْعُ اللَّهِ النَّاسَ بَعْضَهُم بِبَعْضٍ لَّفَسَدَتِ الْأَرْضُ وَلَٰكِنَّ اللَّهَ ذُو فَضْلٍ عَلَى الْعَالَمِينَ ٢٥١
Fahazamoohum biithni Allahi waqatala dawoodu jaloota waatahu Allahu almulka waalhikmata waAAallamahu mimma yashao walawla dafAAu Allahi alnnasa baAAdahum bibaAAdin lafasadati alardu walakinna Allaha thoo fadlin AAala alAAalameena
And they routed them, by the leave of God, and David slew Goliath; and God gave him the kingship, and Wisdom, and He taught him such as He willed. Had God not driven back the people, some by the means of others, the earth had surely corrupted; but God is bounteous unto all beings. (2:251)