‘In 2 Kings 3, Jehoram (king of Israel) and Jehoshaphat (king of Judah) set out to defeat the rebellious Moabites. Jehoshaphat inquires of the prophet of Yahweh as to the outcome of the battle. This prophet is Elisha and Elisha prophesies utter victory:
2Ki 3:14 And Elisha said, “As the LORD of hosts lives, before whom I stand, were it not that I have regard for Jehoshaphat the king of Judah, I would neither look at you nor see you. 2Ki 3:15 But now bring me a musician.” And when the musician played, the hand of the LORD came upon him. 2Ki 3:16 And he said, “Thus says the LORD, ‘I will make this dry streambed full of pools.’ 2Ki 3:17 For thus says the LORD, ‘You shall not see wind or rain, but that streambed shall be filled with water, so that you shall drink, you, your livestock, and your animals.’ 2Ki 3:18 This is a light thing in the sight of the LORD. He will also give the Moabites into your hand, 2Ki 3:19 and you shall attack every fortified city and every choice city, and shall fell every good tree and stop up all springs of water and ruin every good piece of land with stones.”
Yahweh comes upon Elisha and Elisha prophecies in the name of God: Israel and Judah will destroy every fort and major city of the Moabites. Both Elisha and Yahweh are confident in this fact. As God promises, the water fills the land without rain. The enemy army mistakes the pools of water for pools of blood and charge in for the attack. Israel and Judah route them in a decisive victory. But then something happens. The King of Moab sees that he is losing the battle and quickly sacrifices his own son to his local god:
2Ki 3:27 Then he took his oldest son who was to reign in his place and offered him for a burnt offering on the wall. And there came great wrath against Israel. And they withdrew from him and returned to their own land.
This turns the tide against Israel. The Moabites push back and push Israel back into their own land. The Moabites were not “given” into the hand of Israel as Elisha had prophesied.
So what is happening here? Michael Heiser offers the best solution:
In the Old Testament, we read that the Israelites believed the gods of other nations were real, assigned to the nations by Yahweh, who was superior and ruled over all other gods (Deut 32: 8– 9). They believed these gods were demons— real spiritual beings (Deut 32: 17). Given the nature of this worldview, it seems the Israelites were frightened by the sacrifice and lost faith, thinking Moab’s god was angry against them and would empower Moab to win because of the sacrifice. Elisha had told the kings of Israel and Judah that God would help them. So why had He not? This situation isn’t the first time God promises but chooses not to deliver: God had told the Israelites that they would conquer Canaan under Moses and Joshua, yet they failed because of unbelief (Num 13; Deut 31: 1– 7; Josh 13: 1– 5; Judg 1: 27– 36). Yahweh was not defeated by the god of Moab. He was, and is, ready and able to help His people. But He will not do so if they refuse to believe and act on that belief.
God was willing to help Israel defeat the Moabites, but God was never going to act unilaterally. When the people turn and flee, God withdraws His help. This story might also explain the failed prophecy of Tyre.’
source: Chris Fisher (realityisnotoptional).