The maritime area under contention between Kenya and Somalia is a 62,000 sq miles (160,000 sq km) in the Indian Ocean found to be sitting on rich reserves of oil and gas.
After a series of failed talks to resolve the dispute Somalia took the unprecedented step of dragging a reluctant Kenya to the ICJ in 2014, claiming that the maritime border demarcation separating the two countries should take a cue from their 681km land border.
On the other hand, Kenya insists on the maritime line being horizontal beginning from where the two neighbours' coastlines meet.
The 14-member ICJ panel of judges on Tuesday handed the lion's share of the disputed territory to Somalia whose officials have been "celebrating the victory" and handed the rest to Kenya which has rejected the ruling, dismissing it as biased and one-sided.
Already the conflicting rhetoric from Nairobi and Mogadishu is setting the scene for a head-on collision between the two East African neighbours who have witnessed some turbulent relations in recent years.
"At the outset, Kenya wishes to indicate that it rejects in totality and does not recognise the findings in the decision. The decision embodies a perpetuation of the ICJ's jurisdictional overreach and raises a fundamental question on the respect of sovereignty and consent of to international judicial processes. International tribunals have jurisdiction only to the extent of consent by a state" a statement ascribed to President Uhuru Kenyatta said hours after the ruling.
Uhuru warned: "This decision is, in the circumstances a zero sum game which will strain the relations between the two countries. It will also reverse the social, political, and economic gains, and potentially aggravate the peace and security situation in the fragile Horn of Africa region".
Somali President Mohamed Abdullahi Farmaajo rehashed his old accusation against Kenya, saying from the day his administration assumed office in Mogadishu, the Kenyan government had tried to undermine it.
"Since my election, we have faced political, diplomatic, security and economic pressure from the Kenyan leadership" he said while urging Nairobi to accept the ICJ's verdict as fair and transparent.
With Kenya warning that it will not respect the maritime border ruling and Somalia insisting that it does so, where are the already strained relations heading?
Dr Abdiwahab Sheikh Abdisamad, told told the Daily Nation as recently as late last year that Somalia and Kenya are joined at the hip, in reference to the cultural, geographical, and economic bonds inextricably tying these two countries together.
As recently as last August, relations between Nairobi and Mogadishu appeared on the mend after long spells in the doldrums.
President Kenyatta had showdown talks with Somali Prime Minister Mohamed Roble in Nairobi which analysts say was a fair shot by the two countries to rejig their soured relations.
Kenyan Foreign Affairs Cabinet Secretary Raychelle Omamo was also in Mogadishu for similar talks with President Mohamed Abdullahi Farmaajo.
However, Kenyatta's warning about the security implications of the ICJ ruling points to the future of Kenya's peacekeeping role in Somalia where it has some 3, 500 troops under the AMISOM peacekeeping force.
Over the years Kenya had suffered casualties from revenge attacks by the Somali militant sect al-Shabaab, drawing it deeper and deeper into the war against the insurgency in Somalia.
But the distrust by Mogadishu about Kenya's true intentions runs deep and months ago Mogadishu recalled its diplomats from Nairobi, citing interference in its internal affairs especially in the Gedo region.
Kenya denied the allegation and a report by the regional Intergovernmental Authority on Development (IGAD) appears to absolve Nairobi of any wrongdoing.
There is also a tacit economic tug of war between the two countries too.
In May the Somali Civil Aviation Authority slapped a ban on the importation of Khat herbs describing the trade as illegal.
Kenya protested after its miraa traders incurred losses running into tens of millions of Kenyan Shillings as a result.
The fallout from the ICJ's ruling could spell a series of talks at the diplomatic table or a resort to open conflict with Kenya making it clear that it could go to war to protect what it believes to be its sovereign territory.
It had even built and improved a base for its navy a few miles from the disputed area.
With Somalia boasting of no naval presence, perhaps its immediate and only option will be to opt for more dialogue.
The next few months could be testing times for relations between both countries and the region.