We have the testimony of James that the prayers of the righteous carry great weight with the Lord (James 5:16). Moreover, and to the point of this study, Abraham was considered righteous, because he trusted the Lord (Genesis 15:6; cp. Romans 4:9, 13; Galatians 3:6; James 2:23). He wasn’t righteous in the same manner as Abimelech, who claimed he was righteous, because he didn’t do an evil act (Genesis 20:4-5). In other words, he was ignorant of Sarah’s marital status, and, because he didn’t come near her, he was, therefore, righteous. (Genesis 20:4). No, Abraham’s behavior arose out of knowledge, not ignorance, and he was, therefore, called a friend of God (2Chronicles 20:7; Isaiah 41:8; James 2:23).
Jesus told his disciples that they were his friends, if they did what he commanded (John 15:14). If Abraham was God’s friend, then this implies he did what the Lord commanded him to do. Moreover, as the friend of God¸ what would that look like in terms of Abraham’s daily walk (cp. Amos 3:3)? Abraham was righteous, because he trusted God; he believed him, when the Lord told him he would protect him (Genesis 15:1). Therefore, Abraham behaved/walked accordingly. So, in the matter of Abraham and Abimelech, whose prayers do you think would move God to reply favorably—a man who refrained from evil accidentally, or a man who did good, because he knew doing good was important? Moreover, and just as importantly, whose prayers do you think prevented Abimelech from touching Sarah? It certainly wasn’t Abimelech’s prayers, for he never asked for Sarah; he took her.
So, after the Lord had threatened his life and that of the whole nation, of which he was its father, Abimelech not only restored Abraham his wife, Sarah, but he also gave him many sheep, oxen and menservants and women-servants (Genesis 20:14). Moreover, he told Abraham that he could dwell, wherever he pleased in the land, and he would be safe (Genesis 20:15).
As for Sarah, Abimelech told her that he was giving her 1000 pieces of silver, not to reprove her (KJV), as though she needed to be rebuked (verse-16), but the Hebrew word (H3198; yakach) gives the sense of ‘setting the thing right.’ In other words, as so many other translations express, Abimelech offered the 1000 pieces of silver, as evidence to all that she was innocent, and she had done no wrong. The silver was to her a “covering of the eyes” (Genesis 24:65). In other words, the king was expressing his apology for having abused her right to feel safe and free in his land.
After Abimelech had done, as the Lord commanded, something still had to be done in order to save both his life and that of his nation (cp. Genesis 20:7), for God had already done the thing that would destroy both Abimelech and the whole Philistine nation.[1] He and his nation were under a curse, according to the word of the Lord to Abraham (Genesis 12:3). If Abimelech was to live and the Philistines saved, Abraham had to pray that God would remove the curse and bless them, because Abimelech had done all, he could to bless Abraham (Genesis 20:14-16). Therefore, Abraham prayed and interceded for Abimelech, and God opened the wombs of his house once more, and both he and the Philistines were saved alive through prayer (Genesis 20:17-18).
_______________________________________
[1] Without doubt, some women in the nation were pregnant, when Abimelech stole Sarah from Abraham. It is probably so that some but also an abnormal number of pregnant women miscarried, vis-à-vis the fruit leaving the wombs of each woman would have been still born, none surviving. Thus, evidencing that death was already consuming the nation.