Rí, or very commonly ríg (genitive), is an ancient Gaelic word meaning "King". It is used in historical texts referring to the Irish and Scottish kings and those of similar rank. While the modern Irish word is exactly the same, in modern Scottish Gaelic it is Rìgh, apparently derived from the genitive. The word comes from the Proto-Indo-European *h₃rēǵs ("ruler, king"). Cognates include Sanskrit 'rā́jan' ("king") and Latin 'rex' ("king, ruler").