  We analyse the geometrical structure of supersymmetric solutions of type II
supergravity of the form R^{1,9-n} x M_n with non-trivial NS flux and dilaton.
Solutions of this type arise naturally as the near-horizon limits of wrapped NS
fivebrane geometries. We concentrate on the case d=7, preserving two or four
supersymmetries, corresponding to branes wrapped on associative or SLAG
three-cycles. Given the existence of Killing spinors, we show that M_7 admits a
G_2-structure or an SU(3)-structure, respectively, of specific type. We also
prove the converse result. We use the existence of these geometric structures
as a new technique to derive some known and new explicit solutions, as well as
a simple theorem implying that we have vanishing NS three-form and constant
dilaton whenever M_7 is compact with no boundary. The analysis extends simply
to other type II examples and also to type I supergravity.
