  We show that special cycles generate a large part of the cohomology of
locally symmetric spaces associated to orthogonal groups. We prove in
particular that classes of totally geodesic submanifolds generate the
cohomology groups of degree $n$ of compact congruence $p$-dimensional
hyperbolic manifolds "of simple type" as long as $n$ is strictly smaller than
$\frac{p}{3}$. We also prove that for connected Shimura varieties associated to
$\OO (p,2)$ the Hodge conjecture is true for classes of degree $<
\frac{p+1}{3}$. The proof of our general theorem makes use of the recent
endoscopic classification of automorphic representations of orthogonal groups
by \cite{ArthurBook}. As such our results are conditional on the hypothesis
made in this book, whose proofs have only appear on preprint form so far; see
the second paragraph of subsection \ref{org2} below.
