Then the children of Ammon were gathered together, and encamped in Gilead. The children of Israel assembled themselves together, and encamped in Mizpah.
The big problem they confronted was that of finding a capable commander to lead them in the impending war with the Ammonites.  As an inducement, they promised that whoever consented to do this would be recognized as their ruler.