THE HAGUE (Reuters) - The United Nations’ highest court ruled on Thursday it has the authority to adjudicate in a maritime boundary dispute between Kenya and Somalia over stretches of the Indian Ocean potentially rich in oil and gas.

Somalia asked the International Court of Justice (ICJ) in The Hague to rule on the maritime boundaries between the two coastal nations in 2014 after negotiations over the 100,000 square kilometer stretch of sea floor broke down.

The ruling means Somalia’s boundary demarcation claim against Kenya can proceed, potentially affecting hydrocarbon exploration and exploitation rights Kenya has already granted in the roughly triangular area of contested ocean.

Companies that have been awarded Indian Ocean exploration blocks by Kenya include Tullow, Erin Energy, FAR and Dominion, though it is not clear if their parcels lie within the affected area.

Judges rejected Kenya’s claim that a 2009 agreement between the two countries amounted to a commitment to settle the matter out of court, depriving the court of jurisdiction.

“The court finds that Kenya’s preliminary objection to the jurisdiction of the court must be rejected,” presiding judge Ronny Abraham said, reading from the judgment in the tribunal’s ornate courtroom.

Speaking outside the court, Kenya’s Attorney General Githu Muigai said his country would “vigorously prosecute its case” in the upcoming hearings on the demarcation dispute, which have yet to be scheduled.

Kenya had a central role to play in fighting the maritime security risk from the Al Shabaab Islamist militant group in the pirate-infested waters, he added, and said the court case would not change this.

“Kenya maintains the view that litigation can resolve only one aspect of a wide range of complex issues the parties must agree upon,” he said.

Cases at the ICJ, which rules on disputes between states over international treaties, can last many years. Its rulings are binding, though the court has no enforcement powers and countries have been known to ignore its verdicts.