The visit comes after Mohamed Abdullahi Farmajo spoke on the phone on Thursday with President Uhuru Kenyatta.
The two leaders agreed to work together to ensure security at the border. They also agreed to strengthen trade and diplomatic relations.
There had been tension at the border near Mandera when Somali forces clashed with those from the semi-autonomous state of Jubbaland inside Kenyan soil. President Kenyatta had accused Somalia of an “unwarranted attack” on its territory and called it a “flagrant breach” by Somalia.
Somalia accused Kenya of meddling in its internal affairs and warned it to stop its encroachment in the border areas.
In a joint statement Kenya’s interior ministry – along with regional body Igad, the US, UK, and the African Union Mission in Somalia (Amisom) – said it “urgently called upon all actors to exercise restraint”.
The two countries have also been locked in a long-running dispute over sovereignty of an oil-rich area in the Indian Ocean.
The two were unable to settle the matter out of court, ultimately referring the matter to the International Court of Justice (ICJ), which, President Mohamed insisted, should be the ultimate arbiter.
Kenya had favored a negotiated settlement, arguing the court system would not address the political issues around the case. The international court is expected to rule on the maritime dispute in June.