The detention of Somalia's defence minister during a visit to Uganda was based on a misunderstanding and he was expected to be released later on Wednesday, a Ugandan army spokesman said.
"Today, certainly, he is going to be released," Lieutenant-Colonel Felix Kulayigye said.
"We actually had information that there was a Somali dissident on his way and of course with the East African security conference and Independence Day both this week there many dignitaries in town and we had to be on alert," he explained.
"We got information that this Somali gentleman had entered Uganda and we started investigating. We followed him up. After the arrest was made he was identified as a minister and he will be released today (Wednesday)," he added.
Defence Minister Youssuf Mohamed Siad entered Uganda by road from Kenya, according to Kulayigye.
"Certainly he should have come by air. He should have notified us and travelled as a visiting foreign official," he said.
The chief of Uganda's military intelligence service, James Mugira, told AFP late Tuesday that Youssuf Mohamed Siad was "picked (up) as a security measure by Uganda state security."