Electron spin resonance on samarium ions with stabilized valence Sm 3+ is investigated in the fluctuating-valence semiconductor SmB 6 , both pure and doped with the rare-earth ions Eu 2+ , Er 3+ , and Gd 3+ . The dynamic and static Jahn-Teller effects have been observed for the first time on rare-earth ions. The relation between the Jahn-Teller effect in a fluctuating-valence semiconductor and the excitonic nature of the ground state of such a semiconductor is discussed.