In stability analysis of rock blocks, the deformability of the blocks can conveniently be simulated using the boundary element method (BEM). However, all boundary conditions are given as stresses. Thus, the displacement solution is not unique. In this paper, an algorithm is proposed to remove rigid body motions in the solution of the boundary form of Somigliana identity discretized by the direct BEM formulation. The algorithm is applied to the calculation of the normal stiffness of rock blocks and coupled with BS3D, large displacement and rotation algorithm for the general stability of rock blocks. Copyright © 2010 John Wiley & Sons, Ltd.