Where do you draw the line on a patch of water measuring roughly 100 000 square km, about 370 km from the shoreline ?
That's the task facing the International Court of Justice (ICJ) this week, as it hears pleas from both Kenya and Somalia as to why they should own swathes of the Indian Ocean that are potentially rich in oil and gas deposits.
The dispute has dragged on for years, partly because the concept of maritime boundaries is fairly new for African states, says Timothy Walker, a maritime specialist at the Institute for Security Studies (ISS) in South Africa.
"We're talking about an area that has been sea blind. A lot of countries are only now beginning to realize how important a safe maritime domain is in terms of transport and trade for their commerce, but also in terms of potential mineral benefits lying beneath the sea."
Kenya has already earmarked the disputed territory for licensing to Italian mining firm EniSpa, sparking criticism from Somalia that it's "stealing its sea and oil."
A claim deemed "hurtful" by Kenyan authorities.
"Somalia would have the court believe that during all these years, Kenya has been scheming to take advantage of its neighbour to steal its sea and oil," Kenya's Attorney General Githu Muigai told judges at the ICJ on Monday.
Somalia's accusations of bad faith "are absurd as they are hurtful," he added.
Sovereignty at sea
"Sovereignty is very important," insists Walker.
"African states have not really had a presence at sea, they haven't had ships which control their waters, so to now have a state effectively owning parts of the sea, which it can divide up into blocks for oil and gas is very lucrative. But it creates a sense of grievance if you feel those boundaries haven't been correctly drawn."
Kenya wants to draw the line straight out into the Indian Ocean, whereas the Somali government wants to draw it perpendicular to the coast line.
The case at the Hague may have been avoided had Somalia's coordinates and documents not been lost during the collapse of government in the 1990s.
A memorandum of understanding was also signed between the two neighbours in 2009, which for Kenya, had settled the matter.
"The feeling among Somalis is that this was a rushed process," explains Walker.
But given that the Somali government has been rocked by instability ever since, many analysts struggle to see how Mogadishu can make a strong case against Kenya at the ICJ, not forgetting that Nairobi is an important ally in the fight against Al Shebab.
Maritime economy versus security
"When all is said and done, who is better placed to take advantage of the oil exploration facilities?" Asks security expert Andrew Franklin.
"Somalia and Kenya would be better placed to share resources and work together in gas exploitation," he says.
Yet this exploration should not come at the price of security, warn experts.
In Somalia, piracy has often been the heavy sum.
Today, the situation has improved, but simmering border disputes could change that.
"It's important for these border disputes to be resolved because it creates an area of uncertainty," reckons Pottengal Mukundan, the head of the International Maritime Bureau in London. "And in these areas of uncertainty, particularly in weak states, you're likely to have criminal elements that take advantage."
For Timothy Walker, maritime security would be enhanced by better cooperation between African states.
"The ICJ has had similar cases before and has successfully determined maritime boundaries."
Cases like the one between Nigeria and Sao Tome Principe led to a successful joint development zone enabling the two countries to share their resources, he says.
For now, the ICJ must determine whether Kenya has a case to reject Somalia's claim.
"We're going to see a lot of precedence being set especially in terms of the principles in which future boundaries will be fixed."