Good question Ariel..I'm not sure of the answer.. But I do know it was before the law (doesn't make it right though)
Anyhow thanks..now Ive got an interesting bible study to look at today
Not before the Law...
Gen 26:5 Because that Abraham obeyed my voice, and kept my charge, my commandments, my statutes, and my laws.
The word for Laws here is...
H8451
תּרה תּורה
tôrâh tôrâh
to-raw', to-raw'
From H3384; a precept or statute, especially the Decalogue or Pentateuch: - law.
The Laws were well known prior to the codification on Mt. Sinai. Here is an obvious example...
Gen 20:2 And Abraham said of Sarah his wife, She is my sister: and Abimelech king of Gerar sent, and took Sarah.
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?
The first thing to notice here is a Gentile king who knew God and knew that adultery was a capital sin.
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.
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.
God manipulated Abimelech's actions so that he was prevented from having relations with Sarah. God directly intervened because He knew Abimelech's heart. This shows there was a relationship between Abimelech and God.
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.
Why?
Rom 6:23
For the wages of sin is death; but the gift of God is eternal life through Jesus Christ our Lord.
Gen 20:8 Therefore Abimelech rose early in the morning, and called all his servants, and told all these things in their ears:
and the men were sore afraid.
Why were they very afraid? They knew God was real and that He was God. They knew Him, unlike Sennacherib...
2Ki 18:19 And Rabshakeh said unto them, Speak ye now to Hezekiah, Thus saith the great king, the king of Assyria, What confidence is this wherein thou trustest?
2Ki 18:20 Thou sayest, (but they are but vain words,) I have counsel and strength for the war. Now on whom dost thou trust, that thou rebellest against me?
2Ki 18:21 Now, behold, thou trustest upon the staff of this bruised reed, even upon Egypt, on which if a man lean, it will go into his hand, and pierce it: so is Pharaoh king of Egypt unto all that trust on him.
2Ki 18:31 Hearken not to Hezekiah: for thus saith the king of Assyria, Make an agreement with me by a present, and come out to me, and then eat ye every man of his own vine, and every one of his fig tree, and drink ye every one the waters of his cistern:
2Ki 18:32 Until I come and take you away to a land like your own land, a land of corn and wine, a land of bread and vineyards, a land of oil olive and of honey, that ye may live, and not die: and hearken not unto Hezekiah, when he persuadeth you, saying, The LORD will deliver us.
2Ki 18:33 Hath any of the gods of the nations delivered at all his land out of the hand of the king of Assyria?
2Ki 18:34 Where are the gods of Hamath, and of Arpad? where are the gods of Sepharvaim, Hena, and Ivah? have they delivered Samaria out of mine hand?
2Ki 18:35 Who are they among all the gods of the countries, that have delivered their country out of mine hand, that the LORD should deliver Jerusalem out of mine hand?
Sennacherib did not know God, but Abimelech did. Abimelech also understood the Law of God and knew adultery was a sin that brought death.
Gen 20:9 Then Abimelech called Abraham, and said unto him, What hast thou done unto us? and what have I offended thee, that thou hast brought on me and on my kingdom
a great sin? thou hast done deeds unto me that ought not to be done.
This shows us that Abimelech was also a man of integrity.
The Law was know from the time of Adam...
Gen 4:6 And the LORD said unto Cain, Why art thou wroth? and why is thy countenance fallen?
Gen 4:7 If thou doest well, shalt thou not be accepted? and if thou doest not well,
sin lieth at the door. And unto thee shall be his desire, and thou shalt rule over him.
Now there has to be Law to have sin...
Rom 4:15 Because the law worketh wrath: for where no law is, there is no transgression.
Rom 5:13 (For until the law sin was in the world: but sin is not imputed when there is no law.
Rom 5:14 Nevertheless death reigned from Adam to Moses, even over them that had not sinned after the similitude of Adam's transgression, who is the figure of him that was to come.
Rom 7:7 What shall we say then? Is the law sin? God forbid. Nay,
I had not known sin, but by the law: for I had not known lust, except the law had said, Thou shalt not covet.
1Jn 3:4 Whosoever committeth sin transgresseth also the law: for sin is the transgression of the law.
This notion of the Law not being around prior to Moses is non-scriptural.