  Recent observations have shown that in many exoplanetary systems the spin
axis of the parent star is misaligned with the planet's orbital axis. These
have been used to argue against the scenario that short-period planets migrated
to their present-day locations due to tidal interactions with their natal
discs. However, this interpretation is based on the assumption that the spins
of young stars are parallel to the rotation axes of protostellar discs around
them. We show that the interaction between a magnetic star and its
circumstellar disc can (but not always) have the effect of pushing the stellar
spin axis away from the disc angular momentum axis toward the perpendicular
state and even the retrograde state. Planets formed in the disc may therefore
have their orbital axes misaligned with the stellar spin axis, even before any
additional planet-planet scatterings or Kozai interactions take place. In
general, magnetosphere--disc interactions lead to a broad distribution of the
spin--orbit angles, with some systems aligned and other systems misaligned.
