Colombia has lashed out at an International Court of Justice ruling granting the country sovereignty over a group of tiny islands in the western Caribbean - but not its waters.
The president is furious that the court in the Netherlands has also granted Nicaragua control of a large swathe of the surrounding sea and seabed that could hold oil reserves.
The decision not to grant Colombia full sovereignty over the waters connecting all San Andres' islands drew a vehement objection from Colombia's president.
Based on evidence presented to the judges by lawyers for both nations, "Colombia and not Nicaragua has sovereignty over the islands", the court's president Peter Tomka told delegations from both sides.
Despite having its sovereignty claim over the islands rejected, Nicaragua hailed the ruling as a victory.
"Colombia was acting like it was the owner of these islands and like it was owner of all the maritime territory, and the court told them no, that's not how it is," Nicaragua's representative at the court, Carlos Arguello, told the country's national television channel from The Hague. "We've been given very important maritime territory."
The ruling gave Nicaragua "incredible potential wealth and future exploitation of fisheries and other resources, such as minerals", he said. "That's what we were seeking and that's what resulted."
President Juan Manuel Santos told fellow Colombians in a national speech that the court had "committed grave errors" by ignoring the terms of the very treaty it had declared valid and that the decision would hurt the archipelago's fishermen.
The decision effectively cut off four small islands from the rest of the archipelago and Mr Santos said he could not accept the court's "omissions, errors, excesses and inconsistencies".
While Mr Santos said he recognised that the court's decision was final and legally binding, he said Colombia "emphatically rejects this aspect of the decision" and "we don't rule out any recourse or mechanism that international law gives us to defend our rights".