The relativistic dynamics of an electron beam which is accelerated by a circular polarized standing electromagnetic wave in an axisymmetric steady-state magnetic field under cyclotron-resonance conditions is studied. The profile of the inhomogeneous magnetic field is chosen such as to maintain the beam electrons in the space cyclotron autoresonance regime. The influence of the self-consistent field under space-autoresonance conditions is simulated by using the particle-in-cell method. The electric potential produced by electron beams on each time step is found by solving the Poisson equation under the Dirichlet boundary conditions through the fast Fourier transform technique. The axisymmetric magnetic field and the self-consistent electric field are found in the particle positions through bilinear and trilinear interpolations of the mesh node data, which are extensions of the linear interpolation to dimensions D = 2 and D = 3. The beam trajectory and its energy evolution are obtained by solving the relativistic Newton-Lorentz equation employing the Boris leapfrog procedure. The 6-kV/cm TE112 microwave mode of 2.45-GHz frequency is used for the numerical simulations. It is shown that an electron beam of an initial longitudinal energy of 10 keV injected into the axisymmetric magnetic field is found in the resonance phase band, and it is accelerated up to an energy of 0.2 MeV. The main purpose of this paper is to determine the optimum parameters for an electron beam acceleration via the spatial autoresonance mechanism using a numerical modeling.