The meeting, held behind closed doors, touched on a wide range of issue, including peace and security of the region, how to tackle the threat of piracy and terrorism, aviation and air control, toxic waste dumping and illegal fishing, a Djiboutian official close to the meeting told The Anadolu Agency.
The two sides agreed to continue their talks and sign an agreement on these issues when they meet in Ankara on January 15-16, the Djiboutian source told The Anadolu Agency.
The dialogue between the two sides was "amicable," the source said, adding the delegations of the two parties held four meetings on Saturday and Sunday.
The source quoted Guelleh as saying after the talks that dialogue was the only means through which any misunderstanding between the two sides would be resolved.
The delegation of Somaliland comprised 20 members while that of the Somali government included seven members, including the president and prime minister, the source said.
Relations between the two soured when Somaliland, that enjoyed relative peace all through Somalia's civil war period, declared independence through referendum, but the central government has never recognized the move.
The talks are the second of such wide-ranging negotiations after the two leaders met last year in Ankara, where a dialogue process kicked off.
Somaliland and Somalia emerged as one country in 1961 after achieving independence from Britain and Italy respectively.
But Somaliland broke away from the rest of the country in 1991 following the ouster of President Siad Barre and the outbreak of civil war.
Somalia, however, has consistently refused to recognize Somaliland's independence.
Until now, Somaliland has enjoyed relative peace – compared to Somalia, which has remained in the grip of violence since 1991.