The International Court of Justice on Monday rejected a bid by landlocked Bolivia to force Chile to the negotiating table for access to the Pacific Ocean in a row dating back to the 19th century.
Bolivia lost its route to the sea in a 1879-1883 war with Chile, and Santiago has rejected every attempt since then by its smaller and poorer neighbour to win it back.
La Paz took Santiago to the top UN court in The Hague in 2013 over its bid to regain access to the sea, a long-running strain on relations between the two South American countries.
But the ICJ’s judges ruled that Chile had no case to answer.
"The court by 12 votes to three finds that the Republic of Chile did not undertake a legal obligation to negotiate a sovereign access for the… state of Bolivia," judge Abdulqawi Ahmed Yusuf said at the end of a judgment that took an hour and 20 minutes to read out.
Yusuf said, however, he hoped that "with willingness on the part of both parties meaningful negotiations can be undertaken."
Bolivia’s leftist President Evo Morales – who is trying to win political capital at home through the issue as he seeks a fourth term in office – attended the court in person for the verdict.
A small crowd of Bolivian protesters waving flags and playing traditional pan pipes also gathered outside the Peace Palace ahead of the verdict.
The ICJ was set up after the Second World War to rule in disputes between UN member states. The court’s findings are binding and cannot be appealed, although it has no real power to enforce them.
Chile and Bolivia have had no diplomatic relations since 1978, when Bolivia’s last attempt to negotiate a passage to the Pacific broke down in acrimony.
Geoff Gordon, an analyst at the Hague-based Asser Institute, said there were "high stakes for Bolivia and Chile".
The War of the Pacific pitted Bolivia and Peru on one side against Chile on the other, and saw battles fought in the Pacific Ocean, the Andes mountains and even in the Atacama Desert, the driest desert in the world.
Decades of post-independence border tensions in South America were finally ignited by a dispute over Bolivian attempts to tax a Chilean company mining saltpetre, a mineral used in fertilizer that was at the time replacing the traditional use of guano, the excrement of seabirds and bats.
Bolivia, South America’s poorest country, says regaining the 260 miles of coastline along the northern tip of Chile that it lost in the war would stimulate growth and development.
Morales has also used the dispute to boost his popularity at home, where the importance of the issue is underscored by the fact that Bolivia still has a navy despite lack of access to the sea.