Deuteronomy 21:15

CLV(i) 15 In case a man should come to have two wives, the one loved and the other disliked, and they bear sons for him, the loved and the disliked, but the firstborn is the son of the disliked one,