In order to save their own people, some Hivites living in Gibeon extract a treaty out of the Israelites by deception, and the Gibeonites eventually become hewers of wood and drawers of water for Israel. Five Amorite kings of [what has become known as] Jerusalem, Hebron, Jarmuth, Lachish and Eglon join forces to attack Gibeon because of their treaty with Israel. Joshua defeats the Amorites as God assists with large hailstones, and the sun stands still in the middle of the sky for about a full day. Joshua then moves on to take the cities of Libnah, Lachish [including the king of Gezer], Eglon, Hebron and Debir, without survivors. He thus subdues the entire region bounded by Kadesh Barnea, Gaza, Goshen and Gibeon in a single campaign.
Mobilized by Jabin, king of Hazor, the Canaanites, Amorites, Hittites, Perizzites, as well as the Hivites living in the region of Mizpah gather at the Waters of Merom to fight the Israelites, but Joshua attacks them suddenly, defeats them and moves on to take their cities, leaving no survivors. Thus, Joshua, after a long campaign, takes the entire land, destroying also all the Anakites in the territory given to Israel, with the exception of some survivors in Gaza, Gath and Ashdod.