The agreement came at the end of a week-long meeting of the International Maritime Organisation, a United Nations body, in London, where small countries were pitted against large shipping nations that were against such restrictions.
Friday's agreement calls for global shipping emissions to peak as soon as possible, and to reduce the total annual greenhouse gas emissions by at least 50 percent of 2008 levels by 2050. It also calls for efforts to be pursued to phase out greenhouse gas emissions from shipping entirely.
The IMO's Secretary General, Kitack Lim, hailed the agreement as a "successful illustration of a spirit of cooperation," while Pacific leaders called it historic.
"Today the IMO has made history," said the Marshall Islands president, Hilde Heine, in a statement. "While it may not be enough to give my country the certainty it wanted, it makes it clear that international shipping will now urgently reduce emissions and play its part in giving my country a pathway to survival."
More than 2 percent of global emissions of carbon dioxide come from the shipping industry, which is roughly equivalent to Germany's emissions. But shipping, like aviation, has been excluded from previous environmental accords, such as the 2015 Paris Agreement, because its focus was based on a system of state-level targets.
The Pacific countries have long pushed for a reduction in shipping emissions, which have been mostly unregulated until now.
In 2015, the then-foreign minister of the Marshall Islands, Tony de Brum, called the former IMO secretary general Koji Sekimizu "danger to the planet" after Mr Sekimizu spoke against regulating emissions in the industry. Last year, Tuvalu's Prime Minister Enele Sopoaga called for greater accountability for shipping emissions.
But while the agreement has been hailed by these countries as a victory, it's just as much a compromise. It falls well short of some of the lofty ambitions Pacific countries and others held going into discussions.
The European Union and the Marshall Islands, which is the world's second-biggest ship registry, had sought a goal of cutting emissions by 70 to 100 percent by 2050 going into the meeting. The Marshall Islands, at the conference's opening, warned failure to achieve deep cuts would threaten the country's survival as global warming intensifies.
In a joint statement on Saturday, the EU's transport commissioner Violeta Bulc and climate commissioner Miguel Arias Canete said that while the union had "sought a higher level of ambition, this is a good starting point that will allow for further review and improvements over time."
The Marshall Islands' environment minister, David Paul, said that "to get to this point has been hard, very hard. And it has involved compromises by all countries. Not least by vulnerable island nations like my own who wanted something far, far more ambitious than this one."
"If a country like the Marshall Islands, a country that is vulnerable to climate change, and particularly depends on international shipping, can endorse this deal, there is no credible excuse for anybody else to hold back," he said.
Clearly, other large shipping nations didn't agree.
The United States, Saudi Arabia, Brazil and Panama didn't want any targets for cutting shipping emissions at all and, according to reports, it was their opposition that saw the target dragged down to 50 percent. After the deal was signed with a clear majority, the head of the United States delegation to the talks, Jeffrey Lantz, continued to state his country's opposition.
"We do not support the establishment of an absolute reduction target at this time," he said in an interview with the BBC, where he also criticised the IMO's handling of the talks, describing it as "unacceptable and not befitting this esteemed organisation."
A clear majority of the 100-plus nations at the IMO meeting, though, did agree with the need to cut emissions, signing an agreement which also committed to rapid innovation in the industry in terms of fuel efficiency and ship designs.
But a final plan is not expected until 2023, and even then, the initial strategy would not be legally binding for member states.
Still, Mr Paul said history had been made: "Our job is far from over. This is a step - an important step - on our journey to a safe and sustainable future," he said in a statement. "There are many steps to come."