Genesis 26:8
And it came to pass, when he had been there a long time, that Abimelech king of the Philistines looked out at a window, and saw, and, behold, Isaac was sporting with Rebekah his wife. And it came to pass, when he had been there a long time, that Abimelech king of the Philistines looked out at a window, and saw, and, behold, Isaac was sporting with Rebekah his wife.
The verse belongs to the account of Isaac's life and experiences extending across chapters 21 through 27. The episode occurred during Isaac's stay in the Philistine land in a time of famine, after he had been there a long time, amid his abundant blessing there and his dealings with the Philistines, when the king saw Isaac and Rebekah together. Abimelech was a name common to the kings of the Philistines and means my father the king. While dwelling in Gerar Isaac called Rebekah his sister until Abimelech looked out at a window and saw Isaac sporting with Rebekah his wife and knew she was married, having taken her on the supposition that she was unmarried. In this chapter Isaac followed in the way of his father.
Isaac's faithful, productive farm life in Philistia made God's blessing visible to his neighbors and the king. The verse displays God's special providence over Isaac as one of the progenitors of the promised Seed.
God used Abimelech to rebuke Isaac, giving him opportunity to act as a means of stern correction, because one of the people might lightly have lain with her and Isaac would have brought guiltiness upon the kingdom. Abimelech recognized Rebekah as Isaac's wife and understood that for another man to lie with her, even unwittingly, would be the sin of adultery bringing guilt on himself and his people, which proves the prohibition of adultery was known and binding long before the law was given to Moses at Sinai.