2 Kings 1.2b2 Kings (1.2-3, 6, 16) is the only time the Philistine deity of Baal-Zebub is mentioned in the Old Testament and the character of this god is a source of speculation. On the surface, the name Baal-Zebub means "Baal of the flies," which can be translated as "Lord of the flies" or "Master of the flies."
So he sent messengers, saying to them, “Go and consult Baal-Zebub, the god of Ekron, to see if I will recover from this injury.”
Lord of the flies is a strange name for a god. There are two possible takes on this.
The first take is that if flies are associated with plagues and sickness it seems reasonable for the ailing Ahaziah to call upon the god who "masters" the flies/plagues. If you want to get rid of the flies--symbols of sickness and plague--then you call upon the Lord of the Flies.
The other take is that the name Baal-Zebub is an insult inserted into the text. Some have argued that the real name of the god in question was Baal-Zebul, "Baal the prince." By switching from Zebul ("prince") to Zebub ("flies")--calling the god by the wrong but similar sounding name--the writer of 2 Kings may have been intentionally denigrating the god of Ekron.
The Septuagint, the Greek translation of the Old Testament often used by the New Testament writers, renders Baal-Zebub as Baalzebub.
In the New Testament gospels Beelzeboul is mentioned and described as the "prince of demons" (Mark 3.22; Matthew 12.24-28; Matthew 10.25; Luke 11.15-18). Beelzeboul eventually gets translated as Beelzebub in the King James Version.
Many scholars note a connection between Baal-Zebub of 2 Kings and Beelzebub in the synoptic gospels. The nature of the connection is disputed. If there is a connection clearly there was some evolution. We travel some distance from the patron deity of the city of Ekron in 2 Kings to the prince of demons in the gospel accounts.
But if a connection does exist I think the wordplay between Zebul ("prince") and Zebub ("flies") is interesting.
The bible refers to Satan as the "prince" and "ruler" of the world. Satan is Baal-Zebul, "prince." But in the Christian imagination Prince Satan--who appears as an angel of light--is also unmasked as Baal-Zebub. Both designations are true.
Prince of the world and Lord of the flies.