We prove the Mumford--Tate conjecture for those abelian varieties over number fields whose extensions to C have attached adjoint Shimura varieties that are products of simple, adjoint Shimura varieties of certain Shimura types. In particular, we prove the conjecture for the orthogonal case (i.e., for the $B_n$ and $D_n^R$ Shimura types). As a main tool, we construct embeddings of Shimura varieties (whose adjoints are) of prescribed abelian type into unitary Shimura varieties of PEL type. These constructions implicitly classify the adjoints of Shimura varieties of PEL type.