MOGADISHU, Sept 17 (Reuters) - Somalia's President Mohamed Abdullahi Mohamed on Friday accused neighbouring Djibouti of illegally detaining his national security adviser, a criticism which appeared linked to a destabilising row between the president and his prime minister.
Djiboutian authorities held the adviser, Fahad Yasin, preventing him from travelling to Mogadishu by air, the director of communications in the presidency Abdirashid Hashi said, without providing more details.
"Such acts will not help to strengthen our ties between our governments," Hashi said in a statement.
Djibouti's foreign minister, without naming any individual, denied reports that it was interfering in Somalia.
"We will continue to stand by our brothers and sisters in Somalia but never interfere in their internal affairs," Mahmoud Ali Youssouf wrote on Twitter.
Yasin was suspended from his post as director of the National Intelligence Service Agency (NISA) by Prime Minister Mohammed Hussein Roble last week. The president then stepped in and appointed someone other than Roble's choice to head NISA, and gave Yasin a job as his security adviser.
The row between Mohamed and Roble, nominally over a murder investigation, marks an escalation of months of tension between them in a country riven by militant attacks and clan rivalries.
"His (Yasin's) presence is quite polarising, so if he is back in Mogadishu, that is a boon for Mohamed and it is a concern for Roble's side," Mahmood Omar, Somalia analyst at the International Crisis Group, a Brussels-based think-tank, told Reuters.
Mohamed has not gotten on well with the Djibouti government, Omar said, after he embraced Eritrea and Ethiopia and left Djibouti feeling isolated.
"Djibouti has not been happy with the Mohamed government for quite some time so it is not a surprise to see them do something, whether intentionally or unintentionally, that is a detriment to Mohamed," he said.
Mohamed and Roble first clashed in April, when the president unilaterally extended his four-year term by two years, prompting army factions loyal to each man to seize rival positions in the capital, Mogadishu.
The confrontation was resolved when the president put Roble in charge of security and organising delayed legislative and presidential elections. That process was supposed to be concluded next month but was pushed back again last week.
Roble has accused Mohamed of "obstructing effective investigation" of the case of Ikran Tahlil Farah, a NISA agent who went missing while working in the agency's cybersecurity department.
Farah's family has said it believes she was murdered, while the agency has not commented on the case.