It must be remembered that every activity of Satan and his demons is done only by God’s permissive will, and at times, God will use demons to carry out His own purposes in the world.
This is seen on several occasions. One example is found in I Samuel 16:14: “Now the Spirit of Jehovah departed from Saul, and an evil spirit from Jehovah troubled him.” In this verse, God commands an evil spirit to come to King Saul in order to torment him as a punishment for his active and deliberate disobedience against God.
A second example is found in I Kings 22:19-23. In this passage, God uses a lying demon to move Ahab into a war that will cost him his life. It should be noted that, in the context, Ahab had already decided to enter into war against Syria, and all he was really asking for was support for the decision he had already made. As King Ahab had four-hundred false prophets on staff, God used a demon to prophesy lies to Ahab in order that God’s purpose might be carried out and Ahab might be killed in accordance with the prophecy of Elijah the Prophet.
In the above two examples, God used demons for His own purposes against evil men. But sometimes God, through His permissive will, uses a demon to bring proper knowledge and humility to a believer, such as in II Corinthians 12:7: “And by reason of the exceeding greatness of the revelations, that I should not be exalted overmuch, there was given to me a thorn in the flesh, a messenger of Satan to buffet me, that I should not be exalted overmuch.”
In this passage, Paul speaks of a messenger from Satan, which would be a demon, who was sent for the purpose of buffeting Paul. Apparently, this demonic activity resulted in some physical malady and, although Paul prayed that it might be removed, it was not God’s will to do so. Because of the abundance of special revelations given to the Apostle Paul, there was always the danger that Paul might be filled with pride.
In order that Paul might be kept humble, God sent this messenger of Satan, a demon, to buffet Paul by causing some physical infirmity. So at times, God will use demons in the lives of believers for the purpose of conforming the believer to the image of His Son.
(Fruchtenbaum, MBS 19 “The Darkness of Demonism,” 13-14)