The Boris push is commonly used in plasma physics simulations because of its speed and stability. It is second-order accurate, requires only one field evaluation per time step, and has good conservation properties. However, for accelerator simulations it is convenient to propagate particles in z down a changing beamline. A 'spatial Boris push' algorithm has been developed which is similar to the Boris push but uses a spatial coordinate as the independent variable, instead of time. This scheme is compared to the fourth-order Runge-Kutta algorithm, for two simplified muon beam lattices: a uniform solenoid field, and a 'FOFO' lattice where the solenoid field varies sinusoidally along the axis. Examination of the canonical angular momentum, which should be conserved in axisymmetric systems, shows that the spatial Boris push improves accuracy over long distances.