The heaviest elements in the periodic table are synthesized through the rapid neutron-capture process (r-process), but the astrophysical site producing these elements has been a long-standing conundrum. Ultra-faint dwarf galaxies contain a simple fossil record of early chemical enrichment that provide an ideal laboratory to investigate the origin of r-process elements. Previous measurements found very low levels of neutron-capture elements in ultra-faint dwarfs, preferring supernovae as the r-process site. I present high-resolution chemical abundances of nine stars in the recently discovered ultra-faint dwarf Reticulum II, which display extremely enhanced r-process abundances 2-3 orders of magnitude higher than the other ultra-faint dwarfs. Stars with such extreme r-process enhancements are only rarely found in the Milky Way halo. The r-process abundances imply that the neutron-capture material in Reticulum II was synthesized in a single prolific event that is incompatible with r-process yields from ordinary core-collapse supernovae but consistent with a neutron star merger. Together with the recent gravitational wave observations of a neutron star merger and its electromagnetic afterglow, it is now clear that neutron star mergers dominate cosmic production of r-process elements.