“Abraham said, “I did it because I thought, ‘There is no fear of God at all in this place, and they will kill me because of my wife.’ Besides, she is indeed my sister, the daughter of my father though not the daughter of my mother, and she became my wife.”
Genesis 20:11-12 ESV
It didn’t become unlawful until the time of Leviticus when disease came in and people started having smaller life expectancies.