The use of this phrase as a reference to demons (occurring frequently in the Gospels) is rooted in God’s promise to Israel. God had promised that he would remove the spirit of uncleanness
from the land (Zechariah 13:2).1 In the context of that particular promise, the unclean spirit is contrasted with the Holy Spirit—the Spirit of grace and of supplication
—that God would pour out on the house of David and the inhabitants of Jerusalem (Zechariah 12:10). The choice of this phrase as a reference to demons thus recalls that promise to Israel and signalizes its fulfillment in Jesus (see also Jeremiah 31:31–34; Ezekiel 36:26–27).
2 And when Jesus had stepped out of the boat, immediately there met him out of the tombs a man with an unclean spirit.