  The algebras of the integrals of motion of the Hamilton-Jacobi and
Klein-Gordon-Fock equations for a charged test particle moving in an external
electromagnetic field in a spacetime manifold are found. The manifold admits a
four-parameter groups of motions that act nontransitively on the spacetime. All
admissible electromagnetic fields for which such algebras exist are found. In
the case of an arbitrary n-dimensional Riemannian space on which the group of
motions acts, it is proved that the admissible field does not deform the
algebra of symmetry operators of the free Hamilton-Jacobi and Klein-Gordon-Fock
equations. In addition, the system of differential equations, which must be
satisfied by the potentials of the admissible electromagnetic field, have been
investigated for compatibility.
