Somali government forces and their Ethiopian allies have moved into the Somali capital, Mogadishu, after the Islamist group which controlled much of Somalia for the last six months fled.
Who is fighting whom?
On the one side is the transitional government, formed in 2004 in neighbouring Kenya after long peace negotiations, which has the support of Ethiopia.
Gunmen have controlled Mogadishu for 15 years
Interim President Abdullahi Yusuf’s administration, made up of former warlords, has often struggled to control its own members, let alone the country.
Its first 18 months in office were spent squabbling about where to set up its base, eventually settling on the central town of Baidoa as the capital, Mogadishu, was considered too dangerous.
On the other side is the Union of Islamic Courts (UIC) which in June defeated warlords who had controlled and terrorised the city for the 15 years since the country last had an effective national government.
While the UIC gained popular support as it disarmed warring militia and managed to calm Mogadishu’s lawless streets, the international community grew alarmed that a group with alleged links to al-Qaeda was gaining a foothold in East Africa.
Why did Ethiopia decide to intervene?
Ethiopia, which has fought two wars with Somalia, keeps a close eye on its eastern neighbour.
The government in Addis Ababa became alarmed as the UIC rapidly extended its influence to central and southern Somalia and imposed Sharia law.
The Islamists accused the government of being beholden to Ethiopia.
Addis Ababa, for its part, said UIC leaders had links with al-Qaeda.
The Ethiopians’ concerns about the Islamic courts are shared by the Americans, who too are determined to prevent the spread of fundamentalist Islam in Africa.
When did the Ethiopian army step in?
It depends whom you believe.
Ethiopia denied sending troops to fight alongside the interim government when the UIC launched its sweep across central and southern Somalia in mid-2006.
A leaked UN report said up to 8,000 Ethiopian troops were in the country; Addis Ababa only admitted to sending military trainers.
But all that changed on 24 December, when the Ethiopians sent military planes and tanks across the border, opening a 400km (250-mile) front, and providing support for the Somali government’s push towards Mogadishu.
Where have the retreating UIC forces gone?
They are believed to have pulled back to their last remaining stronghold, the southern port city of Kismayo.
The Islamists have vowed to regroup and continue to fight what they view as a foreign occupation.
How long will Ethiopian troops stay in Somalia?
Ethiopia’s Prime Minister Meles Zenawi says his forces will remain for as long at it takes to defeat the UIC.
Facts and figures about life in Somalia
“Our mission in Somalia is very very limited… we are not there to reconstruct Somalia economically, politically or otherwise,” Mr Meles said.
Once his troops had helped the transitional government stabilise Mogadishu “and pursued the [Islamist] remnants” they would leave, he said.
How did the UIC emerge?
Businessmen in Mogadishu have over the years funded a number of Islamic courts, in an attempt to impose law and order in a lawless city riven by factional fighting.
The courts have flogged drug-dealers in public and executed those they have convicted of murder.
They have also banned the popular stimulant, khat, which was used by many gunmen.
Whilst the courts are credited by many residents as having clamped down on crime in Mogadishu, there are elements within the Islamist militia pushing for an Islamic state.
The militias became increasingly powerful as a military force after Mogadishu’s main warlords formed the Alliance for the Restoration of Peace and Counter-Terrorism this year.
The alliance – widely believed to have been backed by the US – said it wished to root out al-Qaeda members being sheltered by the courts.
Who supports them?
Where the UIC militia has obtained its substantial weaponry and financing is unclear.
Some fingers have been pointed towards Saudi Arabia and others to wealthy foreign supporters of Islamic militancy.
Ethiopia’s rival, Eritrea, is accused of passing weapons to the UIC.
What about the alleged al-Qaeda links?
The main source of concern for the United States is alleged al-Qaeda involvement.
The UIC denies any links, or that there are terror training camps in Somalia.
But diplomats believe that small groups of al-Qaeda militants, including foreigners, are operating in the country.
There have been at least four attacks on US and Israeli targets in East Africa – all linked in some way to Somalia.
What does the UIC’s flight mean for Mogadishu?
In the short term the move has left a power vacuum. As the Islamist militias abandoned the city, there were reports of gunfire and looting.
Clan-based militias were said to be reappearing on the streets and there were fears of a return to the anarchy that prevailed in the city for 15 years after the overthrow of President Mohamed Siad Barre in 1991.
Residents in the capital are known to be fiercely opposed to the Ethiopian presence in the country.
What about the government?
With its troops in Mogadishu, the internationally recognised government will hope it can assert its control over the capital for the first time.
It has warned warlords not to destabilise its efforts.
Earlier this month President Abdullahi Yusuf received a boost when the UN Security Council passed a resolution to provide an 8,000-strong African peacekeeping force to protect his government.
If the Ethiopians do leave, Mr Yusuf will be hoping the peacekeepers can be hastily deployed.
However, it is unclear who would fund the mission and which countries would provide the troops.
So what happens next?
There are fears of a wider war. The UIC has called by foreign Islamic fighters to join the battle against Ethiopian forces.
Eritrea, which fought a bitter war with Ethiopia in the late 1990s, is also reported to have sent troops and weapons to help the UIC, although Eritrea has denied these claims.
Whether or not foreign powers end up waging war by proxy in Somalia, a lasting peace there seems as far away as ever.