Electron dynamics in an axially localized large amplitude electron Bernstein mode in a magnetic mirror is studied. The mode is localized due to plasma density and magnetic field profiles and could be driven by an electron cyclotron wave, launched from outside, via linear mode conversion. Energetic electrons of finite gyro-radius resonantly interact with the mode and gain primarily transverse energy favoring stronger mirror confinement. At Bernstein wave normalized amplitude of A00 = 0.01 and for other normalized parameters Zn0 = 40, k⊥c/ω = 10, ${L}^{\prime}_m = 215$, ωc0/ω = 0.9, ψn0 = 3π/2, the electrons can gain energy in the hundreds of keV range.