He inquired of Yahweh for him, and gave him food, and gave him the sword of Goliath the Philistine.
So he said to the Moabites, Let my father and my mother dwell here, until I find out what God's gonna do with me. And so he brought them before the king of Moab: and they dwelt with the king of Moab all the while that David was in the hold ( 1 Samuel 22:3-4 ).