We design an exact output tracking control law for a four degree of freedom spherical inverted pendulum based on the nonlinear stable inversion tool proposed by Devasia, Chen and Paden. The pendulum is a slim cylindrical beam attached to a horizontal plane via a universal joint; the joint is free to move in the plane under the influence of a planar force. The upright position is an unstable equilibrium of the uncontrolled system because of gravity. The objective is to design a controller so that the pendulum can be steered to track some smooth desired translational trajectories while keeping the pendulum tightly around the upright position. The design proceeds in three steps: 1) identification of the internal dynamics; 2) feedforward control design for achievable trajectories; 3) feedback design to stabilize the achievable trajectories. The computer simulations show that the proposed controller can deliver excellent tracking performance.