A second order sliding mode control algorithm conceived as a solution to the chattering elimination problem is proved to be effective also against discontinuous disturbances such as friction. The stabilization problem for a mechanical system is considered and solved by the proposed control algorithm. The method is effective in avoiding complex stick-slip phenomena, since during the transients no oscillations or overshoot take place.