The extreme energy densities generated by ultra-relativistic collisions between heavy atomic nuclei produce a state of matter that behaves surprisingly like a fluid, with exceptionally high temperature and low viscosity. Non-central collisions have angular momenta of the order of 1,000ћ, and the resulting fluid may have a strong vortical structure that must be understood to describe the fluid properly. The vortical structure is also of particular interest because the restoration of fundamental symmetries of quantum chromodynamics is expected to produce novel physical effects in the presence of strong vorticity. However, no experimental indications of fluid vorticity in heavy ion collisions have yet been found. Since vorticity represents a local rotational structure of the fluid, spin-orbit coupling can lead to preferential orientation of particle spins along the direction of rotation. Here we present measurements of an alignment between the global angular momentum of a non-central collision and the spin of emitted particles (in this case the collision occurs between gold nuclei and produces Λ baryons), revealing that the fluid produced in heavy ion collisions is the most vortical system so far observed. (At high energies, this fluid is a quark-gluon plasma.) We find that Λ and hyperons show a positive polarization of the order of a few per cent, consistent with some hydrodynamic predictions. (A hyperon is a particle composed of three quarks, at least one of which is a strange quark; the remainder are up and down quarks, found in protons and neutrons.) A previous measurement that reported a null result, that is, zero polarization, at higher collision energies is seen to be consistent with the trend of our observations, though with larger statistical uncertainties. These data provide experimental access to the vortical structure of the nearly ideal liquid created in a heavy ion collision and should prove valuable in the development of hydrodynamic models that quantitatively connect observations to the theory of the strong force.