We discuss the procedure for the exact solution of the Riemann problem in special relativistic magnetohydrodynamics (MHD). We consider both initial states leading to a set of only three waves analogous to the ones in relativistic hydrodynamics, as well as generic initial states leading to the full set of seven MHD waves. Because of its generality, the solution presented here could serve as an important test for those numerical codes solving the MHD equations in relativistic regimes.