(CNN) -- A 45-year-old British man has been arrested in the Somali capital, Mogadishu, for suspected ties to al Qaeda, a spokesman for Somalia's president said Tuesday.
The man is not of Somali origin, said Abdirahman Omar Osman, also a senior adviser to President Sharif Ahmed.
Osman said the suspect had come to Somalia without a visa and upon questioning said he wanted to help Islam. Authorities have seized his computer.
A spokesman at the UK Foreign Office said it was aware of the matter and was looking into it.
Al-Shabaab, a militant Islamist group allied to al Qaeda, controls much of southern Somalia and is active around Mogadishu.
It has waged an insurgency against the weak Transitional Federal Government since 2007.
CNN's Zain Verjee and Nima Elbagir contributed to this report.