Fahazamoohum bi iznillaahi wa qatala Daawoodu jaaloota wa aataahul laahulmulka Wal Hikmata wa 'allamahoo mimmaa yashaaa'; wa law laa daf'ullaahin naasa ba'dahum biba'dil lafasadatil ardu wa laakinnal laaha zoo fadlin 'alal'aalameen (al-Baq̈arah 2:251)
So they defeated them by permission of Allah, and David killed Goliath, and Allah gave him the kingship and wisdom [i.e., prophethood] and taught him from that which He willed. And if it were not for Allah checking [some] people by means of others, the earth would have been corrupted, but Allah is the possessor of bounty for the worlds. (Al-Baqarah [2] : 251)