Genesis 14:4

Twelve years they served Chedorlaomer, and in the thirteenth year they rebelled.

Twelve years they served Chedorlaomer,.... King of Elam, who was of the race of Shem, and so the prophecy of Noah began to be fulfilled, that Canaan should be servant to Shem, Genesis 9:26; for the kings of Sodom, &c. and their subjects, were of the race of Ham in the line of Canaan, who had by violence seized on that part of the earth which was allotted to the sons of Shem, and therefore Chedorlaomer being a descendant of his claimed his right, and made them tributary to him, which they were for the space of twelve years:

and in the thirteenth year they rebelled; refused homage to Chedorlaomer and to pay tribute to him.