Comets spend most of their life in a low-temperature environment far from the Sun. They are therefore relatively unprocessed and maintain information about the formation conditions of the planetary system, but the structure and composition of their nuclei are poorly understood. Although in situ and remote measurements have derived the global properties of some cometary nuclei, little is known about their interiors. The Deep Impact mission shot a projectile into comet 9P/Tempel 1 in order to investigate its interior. Here we report the water vapour content (1.5 10(32) water molecules or 4.5 10(6) kg) and the cross-section of the dust (330 km2 assuming an albedo of 0.1) created by the impact. The corresponding dust/ice mass ratio is probably larger than one, suggesting that comets are 'icy dirtballs' rather than 'dirty snowballs' as commonly believed. High dust velocities (between 110 m s(-1) and 300 m s(-1)) imply acceleration in the comet's coma, probably by water molecules sublimated by solar radiation. We did not find evidence of enhanced activity of 9P/Tempel 1 in the days after the impact, suggesting that in general impacts of meteoroids are not the cause of cometary outbursts.