Carbonaceous meteorites are thought to be fragments of C-type (carbonaceous) asteroids. Samples of the C-type asteroid (162173) Ryugu were retrieved by the Hayabusa2 spacecraft. We measure the mineralogy, bulk chemical and isotopic compositions of Ryugu samples. They are mainly composed of materials similar to carbonaceous chondrite meteorites, particularly the CI (Ivuna-type) group. The samples consist predominantly of minerals formed in aqueous fluid on a parent planetesimal. The primary minerals were altered by fluids at a temperature of 37 ± 10°C, 5.2+0.7−0.8 (Stat.) +1.6−2.1 (Syst.) million years after formation of the first solids in the Solar System. After aqueous alteration, the Ryugu samples were likely never heated above ~100°C. The samples have a chemical composition that more closely resembles the Sun’s photosphere than other natural samples do.