In Genesis, chapters 37, 39, we read that Joseph was a God-fearing lad and therefore he was hated by Satan. And so, Satan instigated his elder brothers to get rid of him. But God ensured that they didn't take Joseph's life. They managed, however, to sell him off to some Ishmaelite traders. But where do you think those traders took Joseph? To Egypt, of course! That was the fulfillment of Step One in God's plan! In Egypt, Joseph was bought by Potiphar. This too was arranged by God. Potiphar's wife was an evil woman. Taking a fancy to Joseph, she tried to entice him again and again. Finally, when she found that she could not succeed, she accused Joseph falsely and had him cast in jail. But who do you think Joseph met in the jail? Pharaoh's cupbearer! God had arranged for Pharaoh's cupbearer also to be jailed at the same time so that Joseph could meet him. That was Step Two in God's plan. God's third step was to allow Pharaoh's cupbearer to forget about Joseph for two years. "Yet the chief cupbearer did not remember Joseph but forgot him. It happened at the end of two full years that Pharoah had a dream.... Then the chief cupbearer spoke to Pharaoh..." (Gen.40:23; 41:1,9). That was the time, according to God's time-table, for Joseph to be released from prison. Psalm 105:19, 20 says, "Until the time that His word came to pass, the word of the Lord tested him. Then the king sent and released him and set him free." Joseph was now 30 years old. God's time had come. And so God gave Pharaoh a dream. And God reminded the cupbearer also of Joseph as the interpreter of his dream. Thus Joseph came before Pharaoh and became the second ruler in Egypt. God's timing of events in Joseph's life couldn't have been more perfect! We would never have thought of arranging things the way God did. If we had the power to plan Joseph's life, we would probably have prevented people from doing him any harm. But the way God did it was better. It's a far greater miracle when the evil that people do to us is turned to fulfill God's purposes for us! God takes great delight in turning the tables on Satan, so that all things work together for the good of His elect.
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. 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?
In the book of Esther, we read of how God rescued the Jews from being slaughtered as a race. But it is amazing to see how God did it - through one small incident - that the king could not sleep one night. Haman and his wife had been plotting one night to get the king's permission to hang Mordecai on gallows the next morning, as a prelude to destroying all the Jews. But while Haman and his wife were making their wicked plans, God was working on behalf of Mordecai too. "The Keeper of Israel never slumbers or sleeps."(Psa.121:4). God prevented the king from sleeping that night. "During that night the king could not sleep so he gave an order to bring the book of records, the chronicles, and they were read before the king"(Esth.6:1). The king listened to his nation's history for many hours, until the day began to break. Then the reading came to the place where it was recorded that Mordecai had once saved the king from being assassinated. The king asked his servants what honour had been bestowed on Mordecai for this, and they replied that nothing had been done. God's timing of events was again perfect. At that very moment Haman walked in, planning to ask the king for permission to hang Mordecai. Before Haman could open his mouth, the king asked Haman what he thought could be done for one whom the king desired to honour. Haman, conceited man that he was, thought that the king was referring to him, and so suggested a great parade of honour for such a man. "Go and do that for Mordecai, quickly," the king said. How wonderfully our God can turn the tables on Satan. Haman finally hung on the very same gallows that he had made for Mordecai.
As the Bible says, "He who digs a pit (for another) will fall into it (himself). And he who rolls a stone (at another) will find the stone rolling back (to crush him)" (Prov. 26:27). Haman, in this story, is a type of Satan who is always planning some evil against us. God won't stop him, because God has a far better plan. He wants to turn the tables on Satan. The pit that the Devil digs for us will be the one that he himself falls into finally. Zephaniah 3:17 says (in one translation) that God is silently planning for us in love, all the time. While Mordecai was sleeping peacefully that night, quite ignorant of all the wicked plans that Haman and his wife were making against him, God was also planning to protect Mordecai. So, Mordecai could have slept just as peacefully, even if he had known of Haman's wicked plans. Why not? If God was on his side, who could be against 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.