The servants of the king of Syria postulated that the Israelites were servants of the gods of the hills. Therefore, if they would fight Israel in the plain, they would win. They went up to Aphek, and camp across one another for seven days, then fought, with Israel killing over 100,000 Syrians. Those not killed by Israel were killed by a wall that fell on them in Aphek. Ben-Hadad fled from Israel for a second time.
Ben-Hadad and his advisors thought that they could get mercy from Israel if they humiliated themselves by walking to Israel in sackcloth with ropes around their heads. When Ahab invited him into the chariot with him, Ben-Hadad offered to return all the cities which his father had taken from him, and would allow Ahab to set up markets in Damascus. So Ahab made a treaty with Ben-Hadad.
This would be a mistake on the part of Ahab. Even though he was on the path to judgement, God still was working on his behalf for the sake of the nation, However, this treaty would spell defeat for Ahab. When you worship idols and make treaties with the enemy of your soul, you may draw the wrath of God, but at the very least you will walk beyond the protection and help of God. Stay within the boundaries of God’s plan, and you will stay within the boundaries of His covering!