James 4:7, 8 Submit yourselves therefore to God. Resist the devil, and he will flee from you. Draw nigh to God, and he will draw nigh to you. Cleanse your hands, ye sinners, and purify your hearts, ye double minded.
This is a wonderful conditional promise that we can take advantage of more than we probably do. This dual promise involves the two main characters in the spiritual world. We have been given the ability by God to influence the presence or absence of God and Satan in our lives.
God promises that when we resist the devil he will flee from us. The promise is based on this word: ”Greater is he that is in you than he that is in the world.” Satan is always going to try to lie, frighten, and tempt us sin, doubt, misbelief and despair, but he has no real power to make it happen unless we go along with him. Simply resist! Plead the blood of Jesus, pray in His name, and exercise authority over the evil one. He must flee, and his absence is welcome.
At the same time that we are resisting we may exercise the positive side of the coin: draw near to God and He will draw near to you. The Lord will come and fill your heart with His Presence. The one to whom you submit will have the greater influence on your life, happiness, and wellbeing.
The key on our part is recognizing the thoughts inspired by the devil. Then we resist. But we may preemptively prevent the devil and welcome the Lord any time and all the time. He tells us how: cleanse your hands (repent) and purify your hearts (believe the gospel). That means daily repentance and reception of forgiveness and cleansing by faith. Keep God close and Satan far.