King Ahab had heard what the prophet had said and he was worried that he would die. So, he came up with a plan.
II Chronicles 18:29- And the king of Israel said unto Jehoshaphat, I will disguise myself, and will go to the battle; but put thou on thy robes. So the king of Israel disguised himself; and they went to the battle.
King Ahab wanted Jehoshaphat to dress up in his royal garments while he himself went out dressed as any other soldier. If the Syrians were looking for a king to kill, they would go after the man dressed as one.
II Chronicles 18:30-32- Now the king of Syria had commanded the captains of the chariots that were with him, saying, Fight ye not with small or great, save only with the king of Israel. And it came to pass, when the captains of the chariots saw Jehoshaphat, that they said, It is the king of Israel. Therefore they compassed about him to fight: but Jehoshaphat cried out, and the LORD helped him; and God moved them to depart from him. For it came to pass, that, when the captains of the chariots perceived that it was not the king of Israel, they turned back again from pursuing him.
The Syrian king wanted Ahab. He had ordered his soldiers to go straight for the king.
Did God want Jehoshaphat in this battle? We don't know for sure, but I would guess the answer is "no". Why? Because God doesn't want us making friends with wicked people. Did God leave Jehoshaphat because of his mistake? Nope. God helped him out. Only Ahab was doomed by God to die in this battle.
When the Syrians realized that the man dressed as a king wasn't Ahab, they backed off. But, God was going to use the Syrian army to bring about his death sentence on Ahab.
II Chronicles 18:33-34- And a certain man drew a bow at a venture, and smote the king of Israel between the joints of the harness: therefore he said to his chariot man, Turn thine hand, that thou mayest carry me out of the host; for I am wounded. And the battle increased that day: howbeit the king of Israel stayed himself up in his chariot against the Syrians until the even: and about the time of the sun going down he died.
God carried one of the Syrian's arrows and guided it through Ahab's armor into a kill spot. Ahab ordered his chariot driver to take him out of the battle, but it was too late. God's Word was going to come to pass.
I Kings 22:36-38- And there went a proclamation throughout the host about the going down of the sun, saying, Every man to his city, and every man to his own country. So the king died, and was brought to Samaria; and they buried the king in Samaria. And one washed the chariot in the pool of Samaria; and the dogs licked up his blood; and they washed his armour; according unto the word of the LORD which he spake.
God has a way of bringing us back to the one sin that kept us from His will. Ahab's sin was allowing the murder of Naboth the Jezreelite and his sons. Remember, Queen Jezebel paid off people to lie about this family and had them killed so that Ahab could take the family's grape vineyard as his own. Well, in the same spot that the family of Naboth was killed, is the same place where they washed Ahab's blood out of the chariot.
Genesis 9:6- Whoso sheddeth man's blood, by man shall his blood be shed: for in the image of God made he man.
God decreed way back in Noah's day that if a man murdered another that the murderer must pay with his own blood. God's law will come to pass whether the wicked realize it or not. Ahab's blood was the price for Naboth's murder.
I Kings 22:39-40- Now the rest of the acts of Ahab, and all that he did, and the ivory house which he made, and all the cities that he built, are they not written in the book of the chronicles of the kings of Israel? So Ahab slept with his fathers; and Ahaziah his son reigned in his stead.
So, King Ahab died and his son, Ahaziah, was crowned king in his place.
What about Jehoshaphat?
II Chronicles 19:1-3- And Jehoshaphat the king of Judah returned to his house in peace to Jerusalem. And Jehu the son of Hanani the seer went out to meet him, and said to king Jehoshaphat, Shouldest thou help the ungodly, and love them that hate the LORD? therefore is wrath upon thee from before the LORD. Nevertheless there are good things found in thee, in that thou hast taken away the groves out of the land, and hast prepared thine heart to seek God.
Jehoshaphat lived and went back to his house in Jerusalem. But, God wanted the king to know that He wasn't pleased. He sent a prophet to tell Jehoshaphat not to make alliances with evil men.
II Chronicles 19:4-6- And Jehoshaphat dwelt at Jerusalem: and he went out again through the people from Beersheba to mount Ephraim, and brought them back unto the LORD God of their fathers. And he set judges in the land throughout all the fenced cities of Judah, city by city, And said to the judges, Take heed what ye do: for ye judge not for man, but for the LORD, who is with you in the judgment.
Jehoshaphat had a tender heart toward God's rebuke. He decided it was time, yet again, to make sure that his country was serving the Lord Almighty. He reminded his people and his judges that God was watching them and that He would recompense evil.
I Kings 22:42-43- Jehoshaphat was thirty and five years old when he began to reign; and he reigned twenty and five years in Jerusalem. And his mother's name was Azubah the daughter of Shilhi. And he walked in all the ways of Asa his father; he turned not aside from it, doing that which was right in the eyes of the LORD: nevertheless the high places were not taken away; for the people offered and burnt incense yet in the high places.
God blessed Jehoshaphat. God wanted Jehoshaphat to do well because the king wanted to do right. But, some times people don't learn when they're suppose to. Jehoshaphat had made peace with the wicked kings of Israel, but God didn't want him to make friends with those wicked kings. Jehoshaphat couldn't learn this lesson, and it was going to cost him.