Genesis 36:31

And these are the kings that reigned in the land of Edom, before there reigned any king over the children of Israel.

The thirty-sixth chapter of Genesis records the generations of Esau, who is Edom, and is almost wholly taken up with his descendants. Within that genealogy the verse introduces the list of Edom's kings. Those kings are identified as reigning in the land of Edom before any king reigned over the children of Israel.

The mention of kings before Israel had a king is to be read prophetically as referring to Jacob's prophecy of kings for Edom, which Moses had in mind when recording it, just as Jacob also prophesied kings for Israel. That earlier reign does not prove that Genesis was written after Israel's monarchy and does not undermine the integrity of Scripture. The statement may have been added later, or Moses could have known the fact through prophetic inspiration.