“And the king of Israel said to Jehoshaphat, “I will disguise myself and go into battle; but you put on your robes.” So the king of Israel disguised himself and went into battle. Now the king of Syria had commanded the thirty-two captains of his chariots, saying, “Fight with no one small or great, but only with the king of Israel.” So it was, when the captains of the chariots saw Jehoshaphat, that they said, “Surely it is the king of Israel!” Therefore they turned aside to fight against him, and Jehoshaphat cried out. And it happened, when the captains of the chariots saw that it was not the king of Israel, that they turned back from pursuing him. Now a certain man drew a bow at random, and struck the king of Israel between the joints of his armor. So he said to the driver of his chariot, “Turn around and take me out of the battle, for I am wounded.” The battle increased that day; and the king was propped up in his chariot, facing the Syrians, and died at evening. The blood ran out from the wound onto the floor of the chariot.” (1Ki 22:30-35 NKJ)
God had told King Ahab through the prophet Micaiah that he would die if he went to battle against the Syrians that day, in punishment for all his sins. Ahab refused to listen, and instead listened to the prophets of the false gods who always told him what he wanted to hear. He thought he could cheat the odds by disguising himself, but a random bowshot hit him in the joints of his armor and killed him.