The judges urged the South American neighbours to work together on issues surrounding the frontier river, which runs through one of driest places on Earth, as such a "shared resource can only be protected through cooperation".

Chile had asked the court to rule that the Silala river, which runs through the Atacama Desert, was an international waterway.

Judges said on Thursday that during the hearings it became clear that the states did not fundamentally disagree on the designation of the river or the fact that Chile should have access to its waters.

Bolivia and Chile cut off diplomatic ties decades ago. They have brought their long-running rivalry to the The Hague court before.

In 2018, the court ruled in Chile's favour in a case brought by Bolivia seeking that Chile enter into negotiations over granting land-locked Bolivia a corridor to the sea.

The court, formally known as the International Court of Justice, is the United Nations' court for resolving disputes between states.

(Reporting by Stephanie van den Berg; Editing by Alison Williams and Nick Macfie)

By Stephanie van den Berg