A dispute between the UK and Mauritius over sovereignty of the Chagos Islands will be referred to the International Court of Justice (ICJ).
The United Nations' General Assembly voted to seek an opinion from the ICJ on Mauritius' claim that Britain illegally maintains sovereignty over the territory, including Diego Garcia, where the United States has a major military base in the Indian Ocean.
The resolution seeking an advisory opinion from the ICJ was strongly backed by African and non-aligned nations, winning approval on a vote of 94-15 with 65 abstentions.
The loss for Britain came as it begins negotiations to leave the European Union, and there was a lack of support for the UK from the 27 other EU members.
Cyprus voted in favour of the court referral and 22 EU nations, including Germany, France and Italy abstained. Only Bulgaria, Croatia, Hungary and Lithuania voted against the measure in support of Britain.
Mauritius' defence minister, Anerood Jugnauth, told General Assembly members before the vote that the Chagos archipelago has been part of Mauritius since at least the 18th century and was unlawfully taken by the United Kingdom in 1965, three years before the island nation gained independence from Britain.
He said British Foreign Office memos from 1965 and 1966 reveal "shocking truths" of how the UK sought to present the United Nations with a fait acompli in "the dismemberment" of the Chagos islands and the eviction of the people living there.
British Ambassador Matthew Rycroft said the United Kingdom remains confident of its sovereignty over the islands, which it renamed the British Indian Ocean Territory after the 1965 agreement with authorities in Mauritius. He said the UK agreed at that time to return sovereignty to Mauritius whenever the archipelago was no longer needed for military purposes.
The UK concluded an agreement with the United States in 1966 to use the territory for defence purposes. It is now a forward operating location for aircraft and ships that contribute to regional and global security.
The US-UK presence contributes "to guaranteeing the security of the Indian Ocean itself, from which all neighbouring states benefit, including Mauritius", Mr Rycroft said.
"The facilities play a critical role in combating some of the most difficult and urgent problems of the 21st century, such as terrorism, international criminality, piracy and instability in many forms."
Mr Jugnauth said Mauritius has repeatedly stated "that we do not have any problem with the military base, but that our decolonisation process should be completed".
"More than five decades have passed, and now is the time to act," he said.
Mr Rycroft accused Mauritius of circumventing "a vital principle" that a country is not obliged to have a bilateral dispute submitted for a judicial settlement without its consent - "and let me be clear: we do not and we would not give that consent, because we are clear about what was agreed with Mauritius".
The resolution asks the International Court of Justice two questions: Was the process of decolonisation of Mauritius lawfully completed in 1968. What are the consequences under international law of the UK's continued administration, including with respect to the inability to resettle Chagos residents on the islands?
US deputy ambassador Michele Sison strongly backed the UK, warning that establishing a precedent of going to the court "is dangerous for all UN member states".
The International Court of Justice needs to consider "whether it would be appropriate for it to respond to this request," Ms Sison said. "In our view it would not."