The United Nations’ highest court ruled Tuesday in favor of Somalia in a years-long dispute with Kenya about their maritime border, a decision that could worsen the already fragile relationship between the neighboring countries.

The International Court of Justice (ICJ) ruled that Somalia, not Kenya, should control most of the triangle of water in the Indian Ocean over which Kenya has maintained sovereignty since 1979. The area, measuring about 39,000 square miles, is believed to contain deposits of oil and gas and has been a source of tension between the two countries for years.

Kenyan President Uhuru Kenyatta said in a statement after the ruling that the country “rejects in totality” the court’s decision, which he predicted would strain Kenya’s relationship with Somalia at a time when tension is already high in the greater Horn of Africa region.

Meanwhile, in Somalia, President Mohamed Abdullahi Mohamed praised the ICJ as upholding the rule of law.

“Justice has prevailed,” said the president.

A further deterioration of Kenyan-Somali relations, which have been rocky in recent years, could have serious economic and security implications for both countries, said Meron Elias, a Horn of Africa researcher with the International Crisis Group, particularly in relation to the fight against the Somalia-based al-Shabab terrorist group.

Kenya has been a major contributor of troops assisting Somalia’s government in its fight against the group, Elias noted. Al-Shabab, which is linked to the terrorist network al-Qaeda, regularly carries out attacks within Somalia and against Somalia’s neighbors — including Kenya.

A power struggle between Somalia’s president and prime minister ahead of delayed elections, meanwhile, has created a governance vacuum that experts have warned could embolden the group.

Despite the court ruling Tuesday, Elias said Somalia will have little enforcement ability because it has no functioning navy or military. The ICJ does not have enforcement mechanisms.

In her ruling, Judge Joan E. Donoghue, the ICJ president, dismissed Kenya’s argument that Somalia had agreed to the maritime boundary claimed by Kenya.

Donoghue noted that negotiations between the two countries before the ICJ trial, which have since stalled, showed the dispute had not been resolved.

Somalia asked the ICJ to rule on the matter amid the impasse.

Donoghue said the court determined that the boundary should run largely in the same direction as Somalia’s land border, with a slight adjustment, and rejected Kenya’s position that it should follow the latitudinal line at the border.

Kenyan officials have characterized Somalia’s efforts to control the disputed waters as an “illegal grab at the resources of Kenya,” declined to participate in court hearings and last week preempted the ruling by saying their country would no longer recognize the ICJ.

“As a sovereign nation Kenya shall no longer be subjected to an international court or tribunal without its express consent,” Kenya’s Ministry of Foreign Affairs tweeted. “… The Judgement of the Court — whichever way — will have profound security, political, social and economic ramifications in the region and beyond.”

In Kenya, there have been concerns that the ICJ proceedings were influenced by Western powers seeking access to the oil and gas in the Indian Ocean. Somalia held an auction in London in 2019 related to oil and gas blocks in the disputed region, prompting Kenya to recall its ambassador in Mogadishu.

“The ICJ did appear like a kangaroo court, skewed right from the beginning,” said Macharia Munene, a professor of history and international relations at the United States International University in Nairobi, who argued that the case is being driven by European countries with vested interests in the oil and gas industries.

Munene said he doubted that the ruling would have much impact on ordinary people, with the fallout mostly in diplomatic arenas. Nonetheless, the legal fight has stoked fear among fisherfolk in Lamu County on Kenya’s southeastern coast, who say much of their best fishing is done in the disputed area.

Somo M. Somo, a fisherman who chairs the beach management unit in Lamu County, said he worries about what the ruling would mean for business, and for the relationship between Kenyans and Somalis who have lived peacefully in the area for generations.

“If Somalia takes the area and imposes restrictions on us, the fishing communities in Lamu town will hurt the most,” he said. “We have had a sense of fear.”

About 70 percent of Lamu’s fish haul comes from the contested triangle, said Ogutu Okudo, founder of the think tank Africa2100, which researched the potential community effects of an ICJ ruling in the dispute.

“You need to understand the interlinks in these communities and what these mean for people rather than for boundaries in the ocean,” Okudo said. “This is not just an area where people are talking about oil and gas deposits.”

Read more: