Abimelech is mentioned in two different passages in Genesis. Both passages cover peculiar events concerning potential wife swapping. Possibly 90 years elapsed between both events, so it would be safe to assume these are different people.
Sarah is said to be around 90 years old at the time of the birth of Isaac (Gen 17:17), this is when Abraham is 100. In Genesis 25:7, Abraham dies when he is 175 years old, when Isaac is 75. Gen 26 speaks as if Abraham is dead. At minimum, assuming no anachronistic verses, the minimum time between events (Gen 20 and Gen 26) is 75 years.
Theoretically, Abimelech could be the same individual in both passages (considering the age of Abraham’s death). But then one would have to account for the ages of Abimelech in both stories (75 years apart). It seems more likely to be one of two alternative explanations. It should be noted Abimelech literally could mean “My father is King (Molech)”. This seems to be a title of a king, not unlike Caesar or Pharaoh. It seems also to have been used in future generations, often among kings (see Jdg 8 and 2 Sam 11). A second possibility is the human tendency for fathers to name their sons after them. See the confusion surrounding Herod.
If Abimelech is a king’s title (and a different individual than Gen 26) then Abimelech in Gen 20 is the only reference to this particular character in the entire Bible. We know he was the King of Gerar, had many wives/concubines (v 17-18), and he had absolute power over his lands (v 15). We also know Abraham feared being killed by the people under Abimelech’s rule (the land was wicked). We know Abimelech would not hesitate to collect women against their will (or else Sarah could have politely declined be taken). We know Abimelech had enough slaves to give them at will to people he offended (v 14). In other words, Abimelech was a powerful pagan king who reigned over a pagan people.
When Abimelech hears of Sarah, Abraham’s wife, he takes her (thinking that Sarah is Abraham’s sister and not his wife). God then intervenes in a dream to Abimelech.
It is interesting that God has a dialogue with this pagan King. Calvinism teaches “Total Depravity”, that without God no one can be pure or come to God. But in these verses a pagan king reasons with God about morality, directly and unapologetically. Interestingly enough, God agrees with the pagan king:
Gen 20:3 But God came to Abimelech in a dream by night, and said to him, Behold, thou art but a dead man, for the woman which thou hast taken; for she is a man’s wife.
Gen 20:4 But Abimelech had not come near her: and he said, Lord, wilt thou slay also a righteous nation?
Gen 20:5 Said he not unto me, She is my sister? and she, even she herself said, He is my brother: in the integrity of my heart and innocency of my hands have I done this.
Note that Abimelech does not throw up his hands and say “your ways are higher than my ways.” Instead he defends himself and accuses God. He says “will you also slay a righteous nation?”. Abimelech is calling God out on morality. He is defending his actions as done through ignorance. Abimelech has a conscience, and Abimelech has standing to discuss morality with God. God agrees with his reasoning:
Gen 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.
Gen 20:7 Now therefore restore the man his wife; for he is a prophet, and he shall pray for thee, and thou shalt live: and if thou restore her not, know thou that thou shalt surely die, thou, and all that are thine.
Some people say God never intended to kill Abimelech and that Abimelech never convinced God of anything. This does not fly. First God threatened to kill Abimelech not for having relations with Sarah, but for taking her from Abraham (we know it because God accuses Abimelech of having, past tense, done the deed). This would be kidnapping another man’s wife, a capital offense.
Abimlech points out he did not sleep with her. He then adds that he did not know she was betrothed and is not guilty. God states for this reason he kept him from sleeping with her, a different offense than kidnapping another man’s wife. Then God follows this up with another threat to kill Abimelech.
Then why does God follow up the averted threat with another death threat? This does not make sense unless God was not sure how Abimelech would respond. God did not enter Abimelech’s dream knowing for sure Abimelech would not chose to rebel. After all, Abimelech was arrogant enough to take women from strangers, and he was spectacularly wealthy. These two traits do not endure God’s morality to people. Abimelech could reject God, and likely so.
God merely postponed any adulterous sin so that Abimelech would not sin through ignorance. To say God threatened to kill Abimelech with no thought that he could possibility kill Abimelech, is to make God a liar (in the same sense of 1 Jn 5:10). We learn from Genesis 20 that pagan kings can reason with God and change God’s mind.
As a side note:
To those who think the story is false because Abimelech might be lusting after a 90 year old woman, they don’t seem to understand the relative ages of death. What does the normal female look like at that time? How fast does the body decay when people are living to 175? Is it possible that different cultures have different standards of beauty? I once heard an overweight missionary to Africa state that her body type was in demand because weight is associated with riches. Different cultures value different things and we should take caution when projecting current environments on ancient peoples.