and so with God’s permission they defeated them. David killed Goliath, and God gave him sovereignty and wisdom and taught him what He pleased. If God did not drive some back by means of others the earth would be completely corrupt, but God is bountiful to all.
By Allah's will they routed them; and David slew Goliath; and Allah gave him power and wisdom and taught him whatever (else) He willed. And did not Allah Check one set of people by means of another, the earth would indeed be full of mischief: But Allah is full of bounty to all the worlds.