THE HAGUE, Netherlands (AP) — The United Nations’ highest court ruled Thursday that it can hear a case between South American neighbors Guyana and Venezuela about a border dispute that dates back to 1899.

The decision to reject Venezuela’s challenge to the case’s admissibility means it will go ahead at the International Court of Justice, though will likely take years to resolve.

The ruling was a second defeat for Venezuela’s attempts to have the case tossed out. It came more than two years after judges rejected a challenge by Caracas to the world court’s jurisdiction.

In the admissibility challenge rejected Thursday, Venezuela had argued that the court could not hear the case without the involvement of the United Kingdom, which was Guyana’s colonial master at the time of the original border decision.

The territorial dispute dates back to an arbitration award by an international tribunal in 1899 that drew the border between the two South American nations largely to the favor of Guyana, which was then a British colony. The Tunisia-sized swath of jungle west of the Essequibo river in the dispute is rich in gold, diamonds, timber and other natural resources.

Guyana took the case to the world court in 2018 after years of fruitless mediation failed to resolve the dispute. In its case, Guyana asks the court to rule that the 1899 border decision is valid and binding on both countries.

Decisions by the International Court of Justice are final and legally binding.