Hitherto, rings have been found exclusively around the four giant planets in the Solar System. Rings are natural laboratories in which to study dynamical processes analogous to those that take place during the formation of planetary systems and galaxies. Their presence also tells us about the origin and evolution of the body they encircle. Here we report observations of a multichord stellar occultation that revealed the presence of a ring system around (10199) Chariklo, which is a Centaur--that is, one of a class of small objects orbiting primarily between Jupiter and Neptune--with an equivalent radius of 124 9 kilometres (ref. 2). There are two dense rings, with respective widths of about 7 and 3 kilometres, optical depths of 0.4 and 0.06, and orbital radii of 391 and 405 kilometres. The present orientation of the ring is consistent with an edge-on geometry in 2008, which provides a simple explanation for the dimming of the Chariklo system between 1997 and 2008, and for the gradual disappearance of ice and other absorption features in its spectrum over the same period. This implies that the rings are partly composed of water ice. They may be the remnants of a debris disk, possibly confined by embedded, kilometre-sized satellites.