In this paper, the cyclotron autoresonance acceleration of electrons in a stationary inhomogeneous magnetic field is studied. The trajectory and energy of electrons are found through a numerical solution of the relativistic Newton-Lorentz equation by a finite difference method. The electrons move along a TE112 cylinder cavity in a steady-state magnetic field whose axis coincides with the cavity axis. The magnetic field profile is such that it keeps the phase difference between the electric microwave field and the electron velocity vector within the acceleration phase band. The microwaves amplitude of 6kV/cm is used for numerical calculations. It is shown that an electron with an initial longitudinal energy of 8 keV can be accelerated up to 260 keV by 2.45 GHz microwaves at a distance of 17 cm. © 2008 The American Physical Society.