The leaders of the city of Shechem did not like Abimelech anymore. Those people put men on the hilltops to attack and rob everyone that went by. Abimelech found out about those attacks.
Joshua gave them this command: “Listen carefully to what I tell you. You must hide in the area behind the city. Wait for the time to attack. Don’t go far from the city. Continue to watch and be ready.