2:250 When they appeared to Goliath and his soldiers, they said, 'Lord, pour upon us patience. Make us firm of foot and give us victory against the nation of unbelievers.'
2:251 By the permission of Allah, they routed them. David slew Goliath, and Allah bestowed on him the kingship and wisdom, and taught him from that He willed. Had Allah not pushed the people, some by the other, the earth would have been corrupted. But Allah is Bountiful to the worlds.