Despite a sustained production of anthropogenic greenhouse gases, the Earth's mean near-surface temperature paused its rise during the 2000-2010 period. To explain such a pause, an increase in ocean heat uptake below the superficial ocean layer has been proposed to overcompensate for the Earth's heat storage. Contributions have also been suggested from the deep prolonged solar minimum, the stratospheric water vapour, the stratospheric and tropospheric aerosols. However, a robust attribution of this warming slowdown has not been achievable up to now. Here we show successful retrospective predictions of this warming slowdown up to 5 years ahead, the analysis of which allows us to attribute the onset of this slowdown to an increase in ocean heat uptake. Sensitivity experiments accounting only for the external radiative forcings do not reproduce the slowdown. The top-of-atmosphere net energy input remained in the [0.5-1]Wm-2 interval during the past decade, which is successfully captured by our predictions. Most of this excess energy was absorbed in the top 700m of the ocean at the onset of the warming pause, 65% of it in the tropical Pacific and Atlantic oceans. Our results hence point at the key role of the ocean heat uptake in the recent warming slowdown. The ability to predict retrospectively this slowdown not only strengthens our confidence in the robustness of our climate models, but also enhances the socio-economic relevance of operational decadal climate predictions.