A Somali man is in custody in Mogadishu, suspected of trying to take explosives onto a plane in November, officials have revealed.
He had chemicals, liquid and a syringe - materials similar to those used by the Nigerian man accused of trying to blow up a plane on Christmas Day.
The Daallo Airlines plane was due to fly to the northern Somali city of Hargeisa, then to Djibouti and Dubai.
The airport is in one of the few areas controlled by the Somali government.
Much of the country is in the hands of radical Islamist groups, accused of links to al-Qaeda.
But this is the first time that an attempt to blow up a commercial flight in Somalia has been reported.
"We don't know whether he's linked with al-Qaeda or other foreign organisations, but his actions were the acts of a terrorist. We caught him red-handed," police spokesman Abdulahi Hassan Barise told the Associated Press news agency.
Despite the lack of law and order in Somalia, there are daily flights to neighbouring countries such as Djibouti and Kenya.
The African Union peacekeeping force in Somalia works with the government on security in the Mogadishu airport.
US officials have learned about the Somali case and are investigating any possible links with the attempted attack in Detroit, AP reports.
Somalia has not had an effective national government for almost 20 years.