Genesis 20:6
And God said unto him in a dream, Yea, I know that thou didst this in the integrity of thy heart; for I also withheld thee from sinning against me: therefore suffered I thee not to touch her. And God said unto him in a dream, Yea, I know that thou didst this in the integrity of thy heart; for I also withheld thee from sinning against me: therefore suffered I thee not to touch her.
God spoke to Abimelech in a dream after he had taken Sarah when Abraham called her his sister, warning him that to touch her would be sin against God bringing dire punishment. He actively held Abimelech back and did not allow him to touch her, thus keeping him from adultery and protecting Sarah. Taking another man's wife was already known as adultery and great guilt against God, even with honest intent, which proves the moral law and the principle of the seventh commandment were known from the beginning long before Sinai. God acknowledged that Abimelech had acted in integrity and cleanness of heart, for He alone knows hearts and can find uprightness even in one outside His chosen people. Integrity of heart does not mean freedom from sin, for God can recognize sincere intent and still must restrain a person from a particular wrong.
Dream and Divine Restraint
God spoke to Abimelech, king of Gerar, in a dream after Abraham had come into the land of Canaan and had said that Sarah was his sister, whereupon Abimelech had taken her. In that dream God told him that to touch her would be sinning against God. The warning carried dire punishment if he went forward with the act. This was one of two occasions when Abraham's unbelief led him to pass Sarah off as his sister.
God Himself withheld Abimelech and did not suffer him to touch Sarah. By that restraint He kept him from committing adultery. The honest heart Abimelech claimed did not make taking another man's wife right. The restraint shows God's active power to prevent wrongdoing and His protection of Sarah.
The encounter belongs to God's providential dealing with the family of Abraham as the chosen progenitor of the Seed. It stands at the beginning of things, in the history of the Seed and of the enemy's attempts to thwart God's plan, when God's law was in force and gospel promises and prophecies were given to His chosen. It proves that after the fall God continued to manifest His will directly to men, speaking not only to the righteous but to others also, so that the knowledge of God existed and was transmitted at that time. Abimelech's meeting with Abraham's household gave him opportunity to receive divine influence, and God used him to rebuke Abraham. The account ends with Abimelech sending the household onward with gifts and goodwill, under God's blessing upon Abraham's household.
Law Known Before Sinai
Taking another man's wife was already known as adultery, a sin against God bringing guilt and great sin, even where no express recorded command is cited. God restrained Abimelech from touching Sarah and thereby kept him from committing that sin against Himself. Abimelech's claim that he had acted with an honest heart did not make taking another man's wife right or harmless. The prohibition against adultery was thus recognized before the law was given at Sinai, and sin against God was known before the law was given to Israel.
Abimelech's own words prove the knowledge, for his plea that he had acted in the integrity of his heart and in innocency or cleanness of hands shows he already knew that to take another man's wife would have been sinful. His explanation that Abraham had said Sarah was his sister belongs to the same proof, showing he took her unwittingly yet understood the act would have been wrong. His charge that Abraham would have brought a great sin and guilt on him and on his kingdom shows that he, the patriarchs, and mankind in general already knew taking another man's wife was sinful and brought guilt. God prevented him from touching Sarah and treated the act as sin against Himself, with Genesis 20:5-9 used as evidence that the patriarchs knew the seventh commandment before it was proclaimed at Sinai.
The verse therefore proves the moral law, the Ten Commandments, was recognized before it was later written out in full. Especially the principle of the seventh commandment, which forbids adultery, was found in Genesis and known before the law was given at Sinai. This was long before Sinai, more than 400 years before Sinai, proving God's moral law that condemns sin already existed before Sinai with its authority. It was known from the beginning, for in Abraham's time God told Abimelech in a dream that to touch Sarah would be sinning against God, withheld him from doing it, and warned that it would have brought dire punishment upon him.
The incident is specified as an example of violating the tenth commandment by coveting another man's wife. It belongs to an account used to show that the seventh and ninth precepts of God's law were known before the law was proclaimed at Sinai. It is cited as evidence that moral principles, including respect for virtue, were known before the law was given at Sinai, with God recognizing Abimelech's integrity yet restraining him from sinning by touching Sarah.
Hearts Known and Kept
God knew that Abimelech had acted in the integrity, uprightness, honesty and purity or cleanness of heart when he took Sarah. God recognized his good and honest intent and sincerity, yet still kept him back from the act itself. God alone knows hearts, for circumstances and motives can be misunderstood by men. Even one regarded as a heathen may have a clean heart before God.
Integrity of heart does not mean a person is free from sin. God can recognize sincere intent and at the same time have to restrain that person from committing a particular sin.
God is present even where a man makes his bed in hell by yielding to a married woman, and in the integrity of his heart withholds him from the sin of touching her. The rescued soul can then know that the Lord was in that place and cry out to be saved. The language about integrity also teaches that sincere prayer, even while sin still clings to the heart, can gradually weaken sinful desires and loosen their hold upon the soul.