We consider spin–orbit (‘geodetic’) precession for a compact binary in strong-field gravity. Specifically, we compute ψ, the ratio of the accumulated spin-precession and orbital angles over one radial period, for a spinning compact body of mass m1 and spin s1, with , orbiting a non-rotating black hole. We show that ψ can be computed for eccentric orbits in both the gravitational self-force and post-Newtonian frameworks, and that the results appear to be consistent. We present a post-Newtonian expansion for ψ at next-to-next-to-leading order, and a Lorenz-gauge gravitational self-force calculation for ψ at first order in the mass ratio. The latter provides new numerical data in the strong-field regime to inform the effective one-body model of the gravitational two-body problem. We conclude that ψ complements the Detweiler redshift z as a key invariant quantity characterizing eccentric orbits in the gravitational two-body problem.