Atmospheric warming is projected to increase global mean surface temperatures by 0.3 to 4.8 degrees Celsius above pre-industrial values by the end of this century. If anthropogenic emissions continue unchecked, the warming increase may reach 8-10 degrees Celsius by 2300 (ref. 2). The contribution that large ice sheets will make to sea-level rise under such warming scenarios is difficult to quantify because the equilibrium-response timescale of ice sheets is longer than those of the atmosphere or ocean. Here we use a coupled ice-sheet/ice-shelf model to show that if atmospheric warming exceeds 1.5 to 2 degrees Celsius above present, collapse of the major Antarctic ice shelves triggers a centennial- to millennial-scale response of the Antarctic ice sheet in which enhanced viscous flow produces a long-term commitment (an unstoppable contribution) to sea-level rise. Our simulations represent the response of the present-day Antarctic ice-sheet system to the oceanic and climatic changes of four representative concentration pathways (RCPs) from the Fifth Assessment Report of the Intergovernmental Panel on Climate Change. We find that substantial Antarctic ice loss can be prevented only by limiting greenhouse gas emissions to RCP 2.6 levels. Higher-emissions scenarios lead to ice loss from Antarctic that will raise sea level by 0.6-3 metres by the year 2300. Our results imply that greenhouse gas emissions in the next few decades will strongly influence the long-term contribution of the Antarctic ice sheet to global sea level.