Numerical solution of the time-dependent equations for ideal magnetohy
drodynamics shows that jet formation can be a natural consequence of t
he rotation of an accretion disc in a magnetic field. The accretion di
sc loses angular momentum and falls into the gravitational well. Press
ure builds up near the centre of the well and ejects a jet along the r
otation axis. The jet is collimated partly by hydrodynamic funnelling
and partly by the magnetic field. The magnetic field component paralle
l to the rotation axis is compressed and amplified by the infalling di
sc, and plays an essential part in the collimation process.