In this paper, we consider the friction compensation problem for a class of mechanical systems. The friction behavior is described by a nonlinear dynamical model. Since it is difficult to know the nonlinear parts in the frictional model accurately, two neural networks (NNs) are employed in the proposed intelligent controller. Due to the learning capability of the NNs, the designed NN controller can compensate the effects of the nonlinear friction. Stability of the thus proposed learning control system is guaranteed by a rigid proof. Simulation and experimental results are provided to verify the effectiveness of the proposed intelligent scheme.