Resonant diffusion curves for electron cyclotron resonance with field-aligned electromagnetic R mode and L mode electromagnetic ion cyclotron (EMIC) waves are constructed using a fully relativistic treatment. Analytical solutions are derived for the case of a single-ion plasma, and a numerical scheme is developed for the more realistic case of a multi-ion plasma. Diffusion curves are presented, for plasma parameters representative of the Earth's magnetosphere at locations both inside and outside the plasmapause. The results obtained indicate minimal electron energy change along the diffusion curves for resonant interaction with L mode waves. Intense storm time EMIC waves are therefore ineffective for electron stochastic acceleration, although these waves could induce rapid pitch angle scattering for ≳ 1 MeV electrons near the duskside plasmapause. In contrast, significant energy change can occur along the diffusion curves for interaction between resonant electrons and whistler (R mode) waves. The energy change is most pronounced in regions of low plasma density. This suggests that whistler mode waves could provide a viable mechanism for electron acceleration from energies near 100 keV to above 1 MeV in the region outside the plasmapause during the recovery phase of geomagnetic storms. A model is proposed to account for the observed variations in the flux and pitch angle distribution of relativistic electrons during geomagnetic storms by combining pitch angle scattering by intense EMIC waves and energy diffusion during cyclotron resonant interaction with whistler mode chorus outside the plasmasphere.