State-of-the-art climate models suggest that 20th Century ocean warming and sea-level rise were substantially reduced by the 1883 eruption of Krakatau. Volcanically induced cooling of the ocean surface penetrated into deeper layers where it persisted for decades. We find that volcanic eruptions have longer lasting effects than previously suspected, sufficient to offset a large fraction of ocean warming and sea-level rise caused by anthropogenic influences over the 20th Century. We examine the latest suite of coupled ocean-atmosphere model experiments that include time-varying external forcings (e.g., changes in greenhouse gases, solar irradiance, sulfate aerosols and volcanic aerosols) for the period 1880-2000 (see Methods). These models have differences in physics, resolution, initial conditions, 'spin-up' and ocean-atmosphere coupling procedures, as well as different combinations of external forcings. Uncertainties in both the applied forcings and in the model responses to them are therefore inherent in our investigation