Since Ahaziah had no sons when he died, his brother Jehoram took the throne of Israel. Jehoshaphat also had a son named Jehoram, who apparently reigned with him at that time (compare 3:1; 1:17). Although Jehoram did evil in the sight of the Lord by continuing in the idolatry of Jeroboam (calf-worship), he was not as evil as his father Ahab, for he put away some of the worship of Baal (3:2). Baal worship was the most vile form of idolatry, since it involved human sacrifice.
Moab had been subjugated under Ahab and forced to pay tribute to Israel of sheep and wool. After Ahab's death, Mesha king of Moab rebelled, refusing to pay the tribute. This would have hurt Israel's economy, and it was probably their only source of tribute, so Jehoram wanted to recover it. At this time, Israel and Judah were on friendly terms, so king Jehoshaphat of Judah agreed to assist Jehoram in this campaign, just like he had helped his father Ahab (3:7; 1 Kings 22:4). Since the king of Edom was a vassal of Jehoshaphat, he was obligated to assist; so these three kings came up against Moab.
Jehoram was quick to blame God when he saw there was no water, but he was so faithless that he did not even ask for God's help. The godly king Jehoshaphat of Judah suggested they enquire of the Lord (as he had done with Ahab; 1 Kings 22:5) concerning both the water and the battle (3:11). If it had not been for the faith of Jehoshaphat, Elisha would not have spoken, since he was angry with Jehoram for his idolatry. In order to put himself into the proper frame of mind and calm the anger that the presence of Jehoram brought to the surface, Elisha requested some soothing music before he asked guidance from God (cf. 1 Samuel 16:23).
Elisha answered that it was a very simple thing for God to supply them with water, and equally as simple for their great and powerful God to deliver the Moabites into their hands. These words were no doubt spoken so that Jehoram could see that the God of Israel was all-powerful. The Israelites followed God's orders and dug the ditches. God used these very ditches, once He had miraculously filled them with water, to deceive the Moabites into believing that their enemies had turned against each other. Seeing the morning sun's reflection upon the water, they thought it was blood, and the Moabite army, greedy for spoil, rushed carelessly, probably many without weapons, into the seemingly vacant camp. Much to their surprise, the combined Israelite army arose against them.
Mesha, king of Moab could not even manage to get through to the king of Edom with 700 men, probably trying at the weakest link on the battlefront. When he saw that the situation was hopeless in their own strength, he retreated to the fortified city of Kir Haraseth. Meanwhile, in obedience to God's orders, the Israelites were destroying every other fortified city. When they came to besiege Kir Haraseth, Mesha did an abominable thing. In order to gain the favour of their god, who was likely the god Chemosh, he sacrificed his eldest son, the crown prince, upon the wall in the sight of the Israelites. In doing this, he made it a spiritual battle. The Israelites showed themselves superstitious and afraid to continue the siege. Perhaps believing that now the wrath of Chemosh would be against them; so they turned back in disobedience to God.
Sadly, it was not a complete victory for Israel, because they did not learn their lesson; they still did not understand that there was no God but the Lord God of Israel. When the Lord is on the side of His people, there is nothing to fear.