Somalia's MPs are meeting in neighbouring Djibouti to elect a new president of the transitional government.
The Islamist insurgency continues in Somalia
According to the country's transitional charter, a new president should be elected within 30 days following the resignation of the president in office.
However, MPs have extended the deadline and vote on 30 January, with the winner being sworn in the following day.
Meanwhile, Ethiopian troops supporting the government have left the country - and Islamist fighters have seized Baidoa, home of the Somali parliament.
Baidoa was one of the few regions where the government had any effective control.
Some reports say the Islamists have now taken over the town's presidential palace.
Why are elections being held now?
On 29 December 2008 President Abdullahi Yusuf resigned after parliament refused to back his sacking of Prime Minister Nur Hassan Hussein, more popularly known as Nur Adde.
The MPs voted instead to impeach Mr Yusuf as an obstacle to peace.
President Yusuf was an ally of neighbouring Ethiopia - one of Somalia's traditional enemies - and a staunch opponent of Somalia's Islamists.
He opposed Nur Adde in a power struggle over the composition of the government, and Nur Adde's attempts to engage with moderate Islamists.
He was also accused of favouring his own clan, the Darod, over Mogadishu's dominant Hawiye - Nur Adde's clan.
President Yusuf's popularity among the international community waned when he was seen to be obstructing efforts to push through the Djibouti peace agreement, signed by a moderate wing of the Islamist Alliance for the Re-liberation of Somalia (ARS) in August 2008.
The agreement calls for the formation of a unity government.
Why are the elections being held in Djibouti?
Elections are being held outside the country because of insecurity in Somalia. This will also allow the moderate wing of the ARS, which is Djibouti-based, to take part in the process.
In line with the Djibouti peace agreement, MPs voted on 26 January to double the number of seats in parliament from 275 to include Islamists and civil society.
The ARS will have 200 of the new seats, and 75 civil society members will take up the rest.
The expanded parliament will choose the new president.
How are the elections held?
All MPs vote in a secret ballot.
To be elected, a candidate needs a two-thirds majority in the first round.
Otherwise, the candidates with the fewest votes drop out, until only two remain.
Then, the candidate with the most votes is elected.
Candidates must be of Somali origin but must not have a foreign spouse.
However, they are allowed to be foreign passport-holders.
They must pay $,2000 and present a CV.
What about the Islamists?
Hardline Islamists groups continue their militant activity outside the political process.
These including al-Shabab, which is on Washington's list of foreign terrorist groups, and the Asmara wing of the ARS, based in the Eritrean capital under the leadership of Sheikh Hasan Dahir Aweys.
They have vowed to continue fighting to remove Ugandan and Burundian African Union peacekeepers from Somalia and install Sharia law across the country.
BBC Monitoringselects and translates news from radio, television, press, news agencies and the internet from 150 countries in more than 70 languages. It is based in Caversham, UK, and has several bureaux abroad.