Islamist militant group al-Shabab, which controls much of Somalia, has released a joint video with al-Qaeda, announcing the two groups have merged.
Al-Shabab leader Ahmed Abdi Godane, known as Mukhtar Abu Zubair, said he "pledged obedience" to al-Qaeda head Ayman al-Zawahiri.
The two groups have long worked together and foreigners are known to fight alongside Somali militants.
The announcement comes as al-Shabab is under pressure on several fronts.
Africa Union troops supporting the forces of the UN-backed government have taken control of the capital, Mogadishu, while both Kenya and Ethiopia have sent forces into Somalia to push back the Islamists.
Al-Shabab, however, still controls many southern and central areas of the country.
However, correspondents say al-Shabab's policy of banning many foreign aid agencies from areas it controls during the region's worst drought in 60 years has lost the group some of its popular support.
The United Nations says that although the famine in Somalia is officially over, a third of the population still needs urgent feeding.
BBC Somali editor Yusuf Garaad Omar says the merger of al-Shabab and al-Qaeda has the potential to change the dynamics of the conflict in Somalia.
During the 15-minute Arabic-language video posted on jihadist websites, Zawahiri said the move was "good news" for al-Qaeda.
Analysts say the announcement helps boost al-Qaeda after its leader Osama Bin Laden was killed last year.
"Al-Qaeda needs to project power and influence, particularly given its own operational impotence," Australian analyst Leah Farrall told Reuters news agency.
"Al-Shabab's acceptance under the al-Qaeda umbrella probably came with permission from Zawahiri for the group to launch external operations against the West."
This week, the London-based Royal United Services Institute think-tank warned that about 50 Britons were training with al-Shabab and could return to attack the UK.
Last week, William Hague was also in Mogadishu, the first visit by a British foreign secretary in 20 years.
The UK government is holding a conference in London on 23 February to try to find a political solution to Somalia's problems, and tackle piracy and extremism.
Somalia has been without an effective central government since 1991 and since then, has been convulsed by conflict.