The sedimentation of a rigid particle near a wall in a viscous fluid has been studied numerically by many authors, but analytical solutions have been derived only for special cases such as the motion of spherical particles. In this paper the method of images is used to derive simple ordinary differential equations describing the sedimentation of arbitrarily oriented prolate and oblate spheroids at zero Reynolds number near a vertical or inclined plane wall. The differential equations may be solved analytically in many situations, and full trajectories are predicted which compare favourably with complete numerical simulations. The simulations are performed using a novel double-layer boundary integral formulation, a method of stresslet images. The conditions under which the glancing and reversing trajectories, first observed by Russel et al. (J. Fluid Mech., vol. 83, 1977, pp. 273–287), occur are studied for bodies of arbitrary aspect ratio. Several additional trajectories are also described: a periodic tumbling trajectory for nearly spherical bodies, a linearly stable sliding trajectory which appears when the wall is slightly inclined, and three-dimensional glancing, reversing and wobbling.