  The dominant gaseous structure in the Galactic halo is the Magellanic Stream,
an extended network of neutral and ionized filaments surrounding the Large and
Small Magellanic Clouds (LMC/SMC), the two most massive satellite galaxies of
the Milky Way. Recent observations indicate that the Clouds are on their first
passage around our Galaxy, the Stream is made up of gas stripped from both the
LMC and the SMC, and the majority of this gas is ionized. While it has long
been suspected that tidal forces and ram-pressure stripping contributed to the
Stream's formation, a full understanding of its origins has defied modelers for
decades. Several recent developments, including the discovery of dwarf galaxies
associated with the Magellanic Group, the high mass of the LMC, the detection
of highly ionized gas toward stars in the LMC and the predictions of
cosmological simulations all support the existence of a halo of warm ionized
gas around the LMC at a temperature of $\sim5\times10^{5}\;\mathrm{K}$. Here we
show that by including this "Magellanic Corona" in hydrodynamic simulations of
the Magellanic Clouds falling onto the Galaxy, we can simultaneously reproduce
the Stream and its Leading Arm. Our simulations explain the Stream's
filamentary structure, spatial extent, radial velocity gradient, and total
ionized gas mass. We predict that the Magellanic Corona will be unambiguously
observable via high-ionization absorption lines in the ultraviolet spectra of
background quasars lying near the LMC. This prediction is directly testable
with the Cosmic Origins Spectrograph on the Hubble Space Telescope.
