In this paper we prove a result which can be regarded as a sub-Riemannian version of de Rham decomposition theorem. More precisely, suppose that (M, H, g) is a contact and oriented sub-Riemannian manifold such that the Reeb vector field xi is an infinitesimal isometry. Under such assumptions there exists a unique metric and torsion-free connection on H. Suppose that there exists a point qin M such that the holonomy group Psi (q) acts reducibly on H(q) yielding a decomposition H(q) = H_1(q)oplus cdots oplus H_m(q) into Psi (q)-irreducible factors. Using parallel transport we obtain the decomposition H = H_1oplus cdots oplus H_m of H into sub-distributions H_i. Unlike the Riemannian case, the distributions H_i are not integrable, however they induce integrable distributions Delta _i on M/xi , which is locally a smooth manifold. As a result, every point in M has a neighborhood U such that T(U/xi )=Delta _1oplus cdots oplus Delta _m, and the latter decomposition of T(U/xi ) induces the decomposition of U/xi into the product of Riemannian manifolds. One can restate this as follows: every contact sub-Riemannian manifold whose holonomy group acts reducibly has, at least locally, the structure of a fiber bundle over a product of Riemannian manifolds. We also give a version of the theorem for indefinite metrics.