After Ahab died, Moab rebelled against Israel.
One day Ahaziah fell through the balcony railing on the rooftop of his house in Samaria and was injured. He sent messengers off to consult Baal-Zebub, the god of Ekron, "Am I going to recover from this accident?"
God's angel spoke to Elijah the Tishbite: "Up on your feet! Go out and meet the messengers of the king of Samaria with this word, 'Is it because there's no God in Israel that you're running off to consult Baal-Zebub god of Ekron?'
Here's a message from the God you've tried to bypass: 'You're not going to get out of that bed you're in - you're as good as dead already.'" Elijah delivered the message and was gone.
The messengers went back. The king said, "So why are you back so soon - what's going on?"
They told him, "A man met us and said, 'Turn around and go back to the king who sent you; tell him, God's message: Is it because there's no God in Israel that you're running off to consult Baal-Zebub god of Ekron? You needn't bother. You're not going to get out of that bed you're in - you're as good as dead already.'"
The king said, "Tell me more about this man who met you and said these things to you. What was he like?"
"Shaggy," they said, "and wearing a leather belt." He said, "That has to be Elijah the Tishbite!"
The king sent a captain with fifty men to Elijah. Meanwhile Elijah was sitting, big as life, on top of a hill. The captain said, "O Holy Man! King's orders: Come down!"
Elijah answered the captain of the fifty, "If it's true that I'm a 'holy man,' lightning strike you and your fifty men!" Out of the blue lightning struck and incinerated the captain and his fifty.
The king sent another captain with his fifty men, "O Holy Man! King's orders: Come down. And right now!"
Elijah answered, "If it's true that I'm a 'holy man,' lightning strike you and your fifty men!" Immediately a divine lightning bolt struck and incinerated the captain and his fifty.
The king then sent a third captain with his fifty men. For a third time, a captain with his fifty approached Elijah. This one fell on his knees in supplication: "O Holy Man, have respect for my life and the souls of these fifty men!
Twice now lightning from out of the blue has struck and incinerated captains with their fifty men; please, I beg you, respect my life!"
The angel of God told Elijah, "Go ahead; and don't be afraid." Elijah got up and went down with him to the king.
Elijah told him, "God's word: Because you sent messengers to consult Baal-Zebub the god of Ekron, as if there were no God in Israel to whom you could pray, you'll never get out of that bed alive - already you're as good as dead."
And he died, exactly as God's word spoken by Elijah had said. Because Ahaziah had no son, his brother Joram became the next king. The succession took place in the second year of the reign of Jehoram son of Jehoshaphat king of Judah.
The rest of Ahaziah's life is recorded in The Chronicles of the Kings of Israel.