The presidents of Somalia and Kenya signed a range of deals on Friday, including one to restart trade of the stimulant khat, the countries' foreign ministers said, in a sign of improving diplomatic relations.
The two neighbours are together battling an al-Qaida-linked insurgency that has killed thousands of civilians in the last decade.
However, their relationship has been turbulent because of a dispute over the ownership of potential offshore oil and gas deposits, some of which United Nation's lie off their disputed maritime border.
In October last year, the United Nation's International Court of Justice decided largely in favour of Somalia's claim, a ruling which Kenya rejected, saying it did not recognise the findings in the decision.
Somalia's leader, Hassan Sheikh Mohamud, inked deals with his counterpart, Uhuru Kenyatta, in Nairobi during his first official trip to Kenya's capital since winning the presidency in May, the countries' foreign ministers said in a joint statement.
The presidents agreed to restart flights by Kenya's national carrier Kenya Airways (KQNA.NR) to Mogadishu, resume the khat trade from Kenya to Somalia, ease some visa restrictions, and re-open the border, the statement said.
Mohamud previously served as Somalia's president from 2012 to 2017. He was re-elected in May following months of delay caused by squabbling in government, only to face an ongoing Islamist insurgency and the region's worst drought in four decades.
The leaders agreed to work together with regional and international aid bodies to help mitigate the impact of the drought and coordinate efforts in the "fight against terrorism", the statement said.
"Somalia is determined to be at peace with itself & the world," Mohamud wrote on Twitter.