And so by the command of God they defeated them. David killed Goliath, and God gave him kingship and wisdom, and imparted to him the knowledge of whatever He willed. Had it not been for God's repelling some people by means of others, the earth would have been filled with corruption. But God is bountiful to His creatures.