It’s in II Kings 1:1-18. Ahaziah has fallen through a lattice at his palace and is injured. This is the son of Ahab and Jezebel who succeeded his father as King of Israel. He sends messengers to Ekron, a Philistine city, to enquire of the god Baalzebub whether he will live. An angel of the Lord sends Elijah to the messengers to relay to the king that since he had to go to a god in Ekron that he will die.
Ahaziah is sick but he still gets mad and wants to know who told them this. After Elijah is described to him, Ahab sends a captain and 50 soldiers to arrest Elijah. The cocky captain orders Elijah, “O man of God, the king has said, Come down.” Elijah responds that if he is a man of God, let fire come down from heaven and consume the captain and his men. They are consumed by fire.
Ahaziah really wants to get Elijah. He sends another captain and 50 more men and the same thing happens. They are consumed by fire. Now the third captain has learned from observing what happened to the first two groups. He approaches Elijah differently. He falls on his knees before Elijah and begs for his life and those of his men.
The angel of the Lord tells Elijah to go with them to see the king. There is nothing to be afraid of now. Elijah delivers the Lord’s message: Ahaziah will die because he sent messengers to a god of Ekron rather than the God of Israel. Ahaziah dies.
It says in Isaiah 55:6 to seek the Lord while he may be found and to call upon him while he is near. It also says in Hebrews 12:29 that our God is a consuming fire. God does not take sin lightly. Romans 6:23 reminds us again that the wages of sin is death. There is a day coming that everyone will be judged before God according to their works. (Revelation 20:12) The lesson here is don’t trifle with God. Seek Him while you can.