The ion mass spectrometer aboard the Giotto spacecraft measured the composition and velocity distributions of cometary ions at distances of ∼7.5×l06 to ∼1,300 km from the nucleus of comet Halley. Well outside the bow shock, pick-up cometary H+ ions were found in a diffuse shell-like distribution. Heavier ions (C+, H 2O+-group, CO+ and S+) with similar distributions have been identified at ≤3×l05 km. Solar-wind He2+ was found throughout the coma to as close as ∼5,000 km; He+ produced by charge exchange was seen inside ∼2×10 5 km. Deeper within the coma the main cometary hot-ion species identified were H+, H2+, C+, O +, OH+, H2O+, H3O +, CO+ and S+. A pile-up of heavy cometary ions was found at ∼104 km from the nucleus. Giotto crossed the contact surface at ∼4,600 km, based on changes in ion flow velocity and temperature. Inside, ion temperatures as low as ∼340 K and outflow velocities of ∼1 km s-1 were found. Outside the contact surface ion densities vary as r-2, with a transition to an r-l dependence approximately at the contact surface. A large C+ abundance throughout the coma indicates an unexpected direct source of atomic carbon. The nitrogen abundance, on the other hand, is relatively low.