2 Samuel 17:27
And it came to pass, when David was come to Mahanaim, that Shobi the son of Nahash of Rabbah of the children of Ammon, and Machir the son of Ammiel of Lo-debar, and Barzillai the Gileadite of Rogelim, And it came to pass, when David was come to Mahanaim, that Shobi the son of Nahash of Rabbah of the children of Ammon, and Machir the son of Ammiel of Lo-debar, and Barzillai the Gileadite of Rogelim,
David and his forces fell back to Mahanaim in their retreat. That city had been the royal seat of Ishbosheth, giving it standing as a former center of kingship. It was strongly fortified and ringed by a mountainous district that favored further retreat if war required it.
The country around it was well-provisioned, and the people of that region were friendly to David's cause. There many adherents joined him, strengthening his ranks. Wealthy tribesmen also brought abundant gifts of provision and other needed supplies to sustain him and his men.