An inverse dynamics control algorithm for constrained flexible-joint robots is developed. It is shown that in a flexible-joint robot, the acceleration level inverse dynamic equations are singular because the control torques do not have an instantaneous effect on the end-effector contact forces and accelerations, due to the elastic media. Implicit numerical integration methods that account for the higher order derivative information are utilized for solving the singular set of differential equations. Joint structural damping is also included to the model. The control law proposed achieves simultaneous and asymptotically stable trajectory tracking control of the end-effector contact forces and the motion along the constraint surfaces. A 3R spatial robot with all joints flexible is simulated to illustrate the performance of the method. (C) 1999 Elsevier Science Ltd. All rights reserved.