  We study the properties of M and F theory compactifications to three and four
dimensions with background fluxes. We provide a simple construction of
supersymmetric vacua, including some with orientifold descriptions. These
vacua, which have warp factors, typically have fewer moduli than conventional
Calabi-Yau compactifications. The mechanism for anomaly cancellation in the
orientifold models involves background RR and NS fluxes. We consider in detail
an orientifold of $K3\times T^2$ with background fluxes. After a combination of
T and S-dualities, this type IIB orientifold is mapped to a compactification of
the SO(32) heterotic string on a non-Kahler space with torsion.
