They defeated them by God’s leave, and David killed Goliath. God gave him kingship and wisdom, and taught him as He willed. If it were not for God’s support of some people against others, there would be chaos on earth. But God showers His grace upon the people.
فَهَزَموهُم بِإِذنِ اللَّهِ وَقَتَلَ داوۥدُ جالوتَ وَءاتىٰهُ اللَّهُ المُلكَ وَالحِكمَةَ وَعَلَّمَهُ مِمّا يَشاءُ وَلَولا دَفعُ اللَّهِ النّاسَ بَعضَهُم بِبَعضٍ لَفَسَدَتِ الأَرضُ وَلٰكِنَّ اللَّهَ ذو فَضلٍ عَلَى العٰلَمينَ
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