Then he brought them to the king of Moab, and they stayed with him all the time that David was in the stronghold.