Now it was time for Abraham to move all his cattle and flocks to another area finding food for them. Abraham was a nomad, moved from place to place, and stayed temporarily where his animals were grazing. This time he ended up in Gerar where he settled his huge camp, here Abimelech was king.
Again, Abraham did it, he told Sarah his beautiful wife to lie and say that he was her brother giving the impression that she was not his wife. Even thou Sarah was close to ninety and probably pregnant she was nice to look at and desirable. The king, Abimelech heard about her beauty and fetched her into his harem were she stayed waiting for the king to call her.
Abimelech wanted to have sex with Sarah, but every time he tried to make it happen God hindered him, God looked after Sarah because she was the wife of the prophet Abraham. God gave Abraham the title prophet; it implies that Abraham spoke the words of God. God protected His prophet and stopped the king from touching his wife.
The same is true today, if you speak the words of God, God protects you because of the words you speak; speaking the “words of God when in Jesus” makes you a prophet. Abimelech in his intent to have sex with Sarah was innocent, it was Abraham that did wrong, sacrificing his wife making Abimelech sin against God’s prophet.
God sentenced Abimelech to death for trying to touch Sarah, the king was facing the death penalty, he was about to be executed by God, not just Abimelech but also his household was to be killed, God made Abimelech and his people respect Abraham.
God told Abimelech to return the prophets wife to him and then God would pardon Abimelech by Abraham praying for him, saving his life. Abimelech did what God told him in a dream. After this all in the area knew about Abraham and his awesome God.