Neither Israel nor Syria were led by God-fearing statesmen. However, Israel had experienced a recent revival under the zeal of Elijah. So, when a conflict between the 2 nations arose, although neither side behaved commendably, God chose to mightily stand for his people over their Gentile enemies.
As he was picking a fight with him, Benhadad (king of Syria) demanded far too much from Ahab. And, at first Ahab took a cowardly “diplomatic” route by agreeing to the severely unjust demands of Benhadad. But, when Benhadad immediately returned with even harsher demands, Ahab realized with incredulity what was going on, and he refused to comply (despite the fact that Benhadad had created quite a confederation of kings... 32 of them in all [I Kings 20:1] and was leading no small army).
Ahab’s message (in response to Benhadad's second threats) was a good one (1 Kings 20:11). We might say, "Don't count you chickens before they hatch." Ahab was right. Israel soundly defeated the Syrians. However, the prophet came to Ahab again informing him that there would be yet another battle the next year. And, The odds were not good in either conflict (I Kings 20:27). In this case God told Ahab that the whole reason behind His willingness to defend him and his people lay in the brazen unbelief and disrespect toward Jehovah that had oozed from Benhadad (I Kings 20:28).
Sadly, after Ahab had routed them a second time, he made a peace treaty with Benhadad and treated him like a friend and brother. This upset God so much that God sent word to Ahab informing him that because of that miscarriage of opportunity, Ahab would die in Benhadad's place (I Kings 20:42).