A full in tray awaited the Jubilee government when President Uhuru Kenyatta and his Deputy William Ruto assumed office on April 9, 2013.
At the time, Somalia's rising displeasure over the maritime border with Kenya on the Indian Ocean did not seem to be on top of the Jubilee government's to do list.
This even though the disputed area covering approximately 160,000 square kilometres risked ruining a cordial relationship dating back decades.
Still, on May 31, 2013, President Kenyatta's administration released a joint statement with Somalia to the effect that the two countries would work towards demarcating the Indian Ocean area to everybody's satisfaction.
One month later, Somalia reversed its position, saying it had no interest in entering fresh talks over border demarcation with any parties.
Even as Kenya helped Somalia get back on its feet at the peak of civil war between 1991 and 2005, the two countries had never really sat down to resolve the maritime border.
To resolve the dispute, both countries were to lay their claims before the Commission on the Limits of the Continental Shelf (CLCS).
In 2009 the two countries signed a memorandum of understanding (MoU) to the effect that neither party would object to CLCS submissions with border claims stretching beyond 200 nautical miles.
Kenya started pushing for bilateral talks at the time, in a bid to resolve the dispute.
Determination of the maritime border has in the last few years become necessary as it emerges that there are oil rich parts of the disputed area, spread over four different blocks.
Four oil blocks
Somalia is of the view that the border move in a south eastern direction, which would give the Mogadishu government ownership of the four oil blocks.
Kenya on its part argues that the border should run eastwards, which would place the four blocks under her control and in turn earn Nairobi billions of shillings from prospecting for oil.
On February 19, 2014, DP Ruto led a Kenyan delegation in talks with Somalia aimed at diffusing rising displeasure from the Mogadishu government over the disputed triangular patch on the Indian Ocean.
The talks led by Dr Ruto were to be the first of several meetings to have an amicable resolution of a dispute that now threatens to escalate into all-out war between Kenya and Somalia.
Cold war between Kenya and Somalia in recent months has seen both countries vow to defend their perception of the borders at all costs, which experts translate to mean that violence could be used to lay claim to the triangular patch.
Kenya initially listed discussion of the 2009 MoU at the talks led by Dr Ruto, but Somalia protested and the matter was left out of the agenda.
Alongside the Deputy President on the negotiation table were officials from the Attorney General's office, and the Kenya International Boundaries Office (Kibo).
Read: Kenya accuses ICJ of 'procedural unfairness' in maritime case
Prime Minister Abdiweli Sheikh Ahmed had travelled from Mogadishu for the talks.
A follow-up meeting was held in July, 2014, but once again, there was not much progress.
By this time, Kenya was confident that Somalia would change its mind and agree to discussions on the 2009 MoU. The belief was based on Somalia getting "friendlier" towards talks on the document.
Kenyan officials were expected to travel to Mogadishu for further talks between August 25 and 26, 2014. But nobody travelled for the talks.
On August 28, 2014 Somalia held that there was not much to come out of the bilateral talks, and instead opted to sue Kenya at the International Court of Justice.
While Somalia was preparing to put up the fight of its life in the United Nations Court, Kenya was still optimistic that talks would resolve the dispute.
In a move that cooked Kenya's goose, the Nairobi government agreed to participate in the case filed at the ICJ.
Had Kenya refused to recognise the ICJ's jurisdiction at the time, the case would likely not have proceeded to Tuesday's defeat for Nairobi.
From then on, Kenya kept on delaying the inevitable in seeking adjournment after adjournment.
In January, 2017 the ICJ dismissed Kenya's application challenging the court's jurisdiction to hear Somalia's case, arguing that negotiations had been going on in line with the MoU, which was filed with the UN seven years earlier.
The ICJ dismissed Kenya's application.
Kenya would successfully seek to have the case adjourned three times.
In 2019 Kenya asked for time to seek a new legal team, after parting ways with Prof Payam Akhavan from the US, Prof Vaughan Lowe QC from the UK, Prof Alan Boyle (British), Prof Mathias Forteau (French), Mr Karim Khan (British) and Ms Amy Sanders (British).
Read: Somalia faults Kenya's argument on ocean row
When the case was to come up for hearing in March, Kenya requested for a fourth adjournment, citing a missing map crucial to the case and the need to wait until it is safe to have in-person hearings at the Hague.
Kenya was also unhappy with the presence of Somali judge Abdulqawi Ahmed Yusuf, who has represented his country in past legal matters.
The ICJ declined to postpone the case any further. In retaliation, Kenya pulled out of the hearings which went on for one week.
But the court insisted that Kenya had filed a defence, which was used to reach a final decision on Tuesday.