  Let $Y$ be a subvariety contained in a smooth Mumford compactification of an
orthogonal Shimura variety $M \subset A_g$, where $A_g$ is the moduli space of
principally polarized abelian varieties of dimension $g$ with some level
structure, such that $Y$ intersects the boundary of $A_g$ transversally. Then
we give necessary and sufficient conditions of Andr\'e-Oort type for $Y$ itself
being the compactification of a special subvariety $Y^0 \subset M$
