BEFORE the arrival of the Galileo spacecraft in the jovian system, there was little information on the interior structure of Jupiter's largest moon, Ganymede. Its mean density (1,940 kg m-3), determined by the Pioneer and Voyager spacecraft1-3, implies a composition that is roughly 60% rock and 40% ice, which could be uniformly mixed or differentiated into a rocky core and icy mantle4. Here we report measurements by the Galileo spacecraft of Ganymede's overall density and the spherical harmonics, J2 and C22, of its gravitational field. These data show clearly that Ganymede has differentiated into a core and mantle. Combined with the recent discovery of an intrinsic magnetic field5,6, our gravity results suggest that Ganymede has a metallic core of radius 400-1,300 km surrounded by a silicate mantle, which is in turn enclosed by an ice shell ~800 km thick. Depending on whether the core is pure iron or an alloy of iron and iron sulphide, it could account for as little as 1.4% or as much as one-third of the total mass. If the ice were stripped away, Ganymede could look much like Io7 in terms of its size and internal mass distribution.