Large amounts of dust (>10(8)M(o)) have recently been discovered in high-redshift quasars and galaxies corresponding to a time when the Universe was less than one-tenth of its present age. The stellar winds produced by stars in the late stages of their evolution (on the asymptotic giant branch of the Hertzsprung-Russell diagram) are thought to be the main source of dust in galaxies, but they cannot produce that dust on a short enough timescale (&<1 Gyr) to explain the results in the high-redshift galaxies. Supernova explosions of massive stars (type II) are also a potential source, with models predicting 0.2-4M(o) of dust. As massive stars evolve rapidly, on timescales of a few Myr, these supernovae could be responsible for the high-redshift dust. Observations of supernova remnants in the Milky Way, however, have hitherto revealed only 10(-7)-10(-3)M(o) each, which is insufficient to explain the high-redshift data. Here we report the detection of approximately 2-4M(o) of cold dust in the youngest known Galactic supernova remnant, Cassiopeia A. This observation implies that supernovae are at least as important as stellar winds in producing dust in our Galaxy and would have been the dominant source of dust at high redshifts.