Carbon dioxide from ships at sea will be regulated for the first time following a historic agreement reached after two weeks of detailed talks in London.

Shipping companies will halve their greenhouse gas emissions by 2050 under the plan, brokered by the International Maritime Organization and binding across its 170 member states.

The agreement will require a revolution among ships, which are overwhelmingly fuelled by heavy oils at present. In future, they will have to not only be more energy-efficient, but also make use of cleaner energy, in the form of batteries supplying electricity, solar and wind electricity generation, and perhaps even a return to sail in some cases, or more controversially to nuclear power, as some warships already use.

Environmental campaigners said the plan was not enough given the urgency of tackling climate change, though they welcomed the deal, which has taken decades of work. Greenhouse gas emissions from shipping and aviation were omitted from the 1997 Kyoto protocol and have been excluded from regulations on carbon ever since, even though shipping is used for 80% of global trade.

Although shipping accounts for only about 2% of global carbon emissions, it has been a cause of particular concern, both because of the increased need for transport under the globalising economy and because many ships use dirty, carbon-rich fuels such as heavy diesel, which would be banned in many countries from onshore transport.

Campaigners said cuts of at least 70% from shipping emissions by 2050, compared with the 2008 baseline chosen by the IMO, would be needed to meet the aims of the landmark 2015 Paris agreement, under which countries have agreed that temperature rises should be limited to no more than 2C above pre-industrial levels.

John Maggs, president of the Clean Shipping Coalition and senior policy adviser at the campaigning group Seas at Risk, said: “We have an important agreement and this level of ambition will ultimately require a sector-wide shift to new fuels and propulsion technologies. But what happens next is crucial. The IMO must move swiftly to introduce measures that will cut emissions deeply and quickly in the short term – without these, the goals of the Paris agreement will remain out of reach.”

Sveinung Oftedal, chair of the negotiations at the IMO for the Norwegian government, compared the achievement to the space race, saying: “Like Apollo 11 returning to Earth, we knew we needed to land and we did.”

Countries holding out against a stronger agreement included Brazil, Panama, Saudi Arabia and the US, according to Bill Hemmings, shipping director at Transport & Environment, an NGO. The EU and many Pacific islands were among those pressing for a stronger deal.