In the first chapter of Exodus, we read that Pharaoh was disturbed by the Israelites, even though they were slaves. They were becoming numerous and he was afraid that they would finally rebel against him and stop working for him. So he passed an order that all male children born to the Israelites must be killed immediately.
Now that scheme originated from the devil. Satan has always been after the Jews to kill them - many times in human history. This was just the first of such occasions.
God not only protects us from Satan's plans but does something even better: He turns the tables on Satan and uses Satan's work to fulfil God's purposes. That shows God's almighty power in a much greater way than if He merely destroyed Satan or merely stopped Satan from working.
God shows us His power not only by protecting us from the devil but by using the very thing that Satan does to destroy him.
The greatest example of this is Calvary - where Satan got Jesus' enemies to crucify Him. But that cross became the very place where Satan himself was defeated!! Satan's plan backfired on him - as it always has.
God turned the tables on Satan for Jesus. He will do the same for us too if we live with a clear conscience in humility before Him. Whatever the devil and his agents do to harm us will be turned back on them - and God's purposes for our lives will be fulfilled. This is one of the main messages of the Bible - and we see it happening again and again in the Scriptures.
We see that because Pharaoh had passed an order that all male babies should be killed, Moses' mother put Moses into a little basket and floated it down the river with a prayer to God. If it were not for that evil edict, she would never have done such a thing. But because she did that, Moses was picked up by Pharaoh's daughter, and he grew up in Pharaoh's palace - the place where God wanted him to be trained for the first 40 years of his life. That could never have happened if Pharaoh had not passed that evil law, for then Moses would have grown up to be just another slave.
Do you see how God's purposes are fulfilled through what Satan does?