The men were abducted when about 10 gunmen arrived in a car and a pickup truck mounted with machine guns at the Sahafi Hotel in Mogadishu and disarmed the hotel guards, said Abdi Mohamed Ahmed, who owns a teashop in front of the hotel. The manager, Mohamed Hassan Gafaa, said several gunmen then went door-to-door inside the hotel until they found the foreign men.
Earlier reports indicated the men had registered in the hotel as journalists.
Foreigners rarely go to Mogadishu, which is among the most dangerous cities in the world, and when they do they travel only in convoys with armed guards. Many fear the power vacuum in Somalia will provide a haven for terrorists, as the military and police force are weak and in disarray.
Various Islamist groups have been fighting the U.N.-backed government since being chased from power 2 1/2 years ago. The situation is complicated by the continual splintering and reforming of alliances and a tangled web of clan loyalties.
The impoverished Horn of Africa nation has not had a functioning government for 18 years. Mogadishu sees near-daily battles between government and insurgent forces. Thousands of civilians have been killed in recent years.
The lawlessness has allowed piracy to flourish off the coast, and kidnappings for ransom on land have also become increasingly common.
Direct attempts by outsiders to intervene in Somalia have been disastrous in the past.