The International Court of Justice (ICJ) ruled on Monday that landlocked Bolivia cannot force its coastal neighbor Chile to negotiate over allowing it access to the Pacific Ocean.

"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 told the Hague-based ICJ.

The binding ruling was a political setback for Bolivian President Evo Morales, who in 2012 had suspended talks with Chile on the subject of sea access in favor of bringing the case before the ICJ. Morales was present in the UN's top court when the decision was announced.

Chilean President Sebastian Pinera listened in on the ICJ's ruling with his advisors from Santiago

No sea access since 1904

Bolivia lost its former 400-kilometer (250-mile) long coastline to Chile in a 1904 treaty following the War of the Pacific (1879-1883). Since then, the two South American nations have occasionally discussed establishing a corridor so Bolivia can access the sea and issued declarations and memos on the topic. However, the ICJ ruling found that despite these instances, Chile was not under any obligation to negotiate on the issue.

Bolivia originally brought the case to the ICJ in 2013, arguing that its Andean neighbor had not kept promises made in the meantime to negotiate access. For its part, Chile maintained that the 1904 treaty settled the issue of sea access.

Despite the ruling, the ICJ said in its conclusion that its decision "should not stop the parties from continuing their dialogue and exchanges in a spirit of good neighborliness."

Bolivia would like to have a corridor through Chile so it can access the sea

Following the ruling, Chilean President Sebastian Pinera said that The Hague had achieved justice with its ruling, adding that Bolivia's claims had been ungrounded. He said his Bolivian counterpart had created "false expectations" for Bolivians and offered to keep collaborating with Bolivia on issues of mutual interest.

Morales, meanwhile, said from the steps of the court in The Hague that the decision did not rule out future negotiation but called on the parties to continue with dialogue. He added that Bolivia "will never give up" pursuing its claims for sovereign access to the Pacific.

A controversial coastline

Bolivia is much poorer than its neighbor Chile, and Bolivian representatives had argued that restoring sea access would make a transformative difference to the country while only minimally impacting Chile. Chile currently allows Bolivia duty-free access to the port of Arica, located on the northern border to Peru.

The contested coastline has been a source of tension between the two South American neighbors, who have not had full diplomatic relations since 1978.

The ICJ's ruling was broadcast live on Bolivian television, with jumbo screens scattered across the capital city of La Paz.

Bolivia and Paraguay are the only two South American nations that lack sea access. Nonetheless, maritime and naval activities play an important role in Bolivian national consciousness. Bolivia has the largest navy of any landlocked country in the world with around 6,000 personnel. Its members turn out in full uniform every year for national Day of the Sea celebrations.

In March, tens of thousands of Bolivians helped unfurl a nearly 200-km (124-mile) long flag to show support for the country's demand for sea access.

Watch video 00:53 'World's biggest flag'

cmb/msh (dpa, EFE, AP, Reuters)

Each evening at 1830 UTC, DW's editors send out a selection of the day's hard news and quality feature journalism. You can sign up to receive it directly here.