rei (Galician) comes from Old Portuguese rei, from Latin regem, from Latin rex, from Proto-Italic rēks, from Proto-Indo-European h₃rḗǵs, from Proto-Indo-European h₃reǵ- — to straighten, to right oneself; right; just.
rei (Galician): king