  We consider a periodic Schr\"odinger operator in two dimensions perturbed by
a weak magnetic field whose intensity slowly varies around a positive mean. We
show in great generality that the bottom of the spectrum of the corresponding
magnetic Schr\"odinger operator develops spectral islands separated by gaps,
reminding of a Landau-level structure.
  First, we construct an effective Hofstadter-like magnetic matrix which
accurately describes the low lying spectrum of the full operator. The
construction of this effective magnetic matrix does not require a gap in the
spectrum of the non-magnetic operator, only that the first and the second Bloch
eigenvalues do not cross but their ranges might overlap. The crossing case is
more difficult and will be considered elsewhere.
  Second, we perform a detailed spectral analysis of the effective matrix using
a gauge-covariant magnetic pseudo-differential calculus adapted to slowly
varying magnetic fields. As an application, we prove in the overlapping case
the appearance of spectral islands separated by gaps.
