  Context: The role of magnetic fields during high-mass star formation is a
matter of fierce debate, yet only a few direct probes of magnetic field
strengths are available.
  Aims: The magnetic field is detected in a number of massive star-forming
regions through polarization observations of 6.7 GHz methanol masers. Although
these masers are the most abundant of the maser species occurring during
high-mass star formation, most magnetic field measurements in the high-density
gas currently come from OH and H2 O maser observations.
  Methods: The 100-m Effelsberg telescope was used to measure the Zeeman
splitting of 6.7 GHz methanol masers for the first time. The observations were
performed on a sample of 24 bright northern maser sources.
  Results: Significant Zeeman splitting is detected in 17 of the sources with
an average magnitude of 0.56 m/s . Using the current best estimate of the 6.7
GHz methanol maser Zeeman splitting coefficient and a geometrical correction,
this corresponds to an absolute magnetic field strength of 23 mG in the
methanol maser region.
  Conclusions: The magnetic field is dynamically important in the dense maser
regions. No clear relation is found with the available OH maser magnetic field
measurements. The general sense of direction of the magnetic field is
consistent with other Galactic magnetic field measurements, although a few of
the masers display a change of direction between different maser features. Due
to the abundance of methanol masers, measuring their Zeeman splitting provides
the opportunity to construct a comprehensive sample of magnetic fields in
high-mass star-forming regions.
