Sept 21 (Reuters) - Somalia's Prime Minister Omar Abdirashid Sharmarke resigned on Tuesday, after months of intense pressure to quit the United Nations-backed interim government.
Here is a timeline of events in Somalia in the last five years:
Oct. 2004 - In 14th attempt since 1991 to restore central government, lawmakers elect Ethiopian-backed warlord Abdullahi Yusuf as president. In December, Prime Minister Mohamed Ali Gedi swears in 27 ministers in Kenya.
June 2006 - The Somalia Islamic Courts Council (SICC) seizes the capital Mogadishu from U.S.-backed warlords and takes control of parts of southern Somalia.
Oct. 9 - Islamists declare holy war against Ethiopia, which they accuse of invading Somalia to help the government.
Dec. 24 - Ethiopian Prime Minister Meles Zenawi says he is waging war on the Islamists to protect Ethiopia's sovereignty, in the country's first public admission of military involvement.
Dec. 28 - Islamists flee Mogadishu ahead of a joint Ethiopian and Somali government force which captures the city.
Dec. 31 - Prime Minister Gedi enters Mogadishu.
Jan. 8, 2007 - Yusuf arrives in Mogadishu for the first time since he became president in 2004.
Feb. 20 - U.N. Security Council authorizes African Union peacekeeping mission for Somalia for 6 months. A Ugandan vanguard flies into Baidoa on March 1.
Aug. 30 - President Yusuf winds up 6-week-long peace conference, which had no visible impact on insurgency. Islamists and some other opposition figures had boycotted the talks.
Oct. 29 - Gedi resigns after a long feud with the president.
Nov. 24 - Parliament swears in Nur Hassan Hussein as prime minister to bolster an interim government weakened by months of political deadlock and battles against insurgents.
Aug. 18, 2008 - Somalia formally signs a peace deal with some opposition figures, but the pact is rejected by hardliners.
Nov. 14 - Yusuf admits Islamist insurgents control most of the country.
Dec. 29 - Yusuf resigns.
Jan. 2, 2009 - Ethiopia says it has started pulling its troops out of Somalia.
Jan. 26 - Last Ethiopian soldiers leave. Fighters from al Shabaab move into Baidoa, capturing an old granary serving as Somalia's parliament.
Jan. 31 - Moderate Islamist leader Sheikh Sharif Ahmed is sworn in as president, promising to forge peace with east African neighbours, tackle rampant piracy offshore and rein in hardline insurgents.
Feb. 14 - Parliament endorses Omar Abdirashid Ali Sharmarke as prime minister to head a unity government tasked with restoring order.
April 18 - Parliament votes unanimously to implement sharia law across the country to undermine hardline Islamist rebels.
Sept. 17 - Al Shabaab hits the African Union's main base in Mogadishu with twin suicide car bombs killing 17 peacekeepers.
Feb. 1, 2010 - Al Shabaab insurgents agree to join forces with a smaller southern militia and both groups profess their loyalty to al Qaeda.
May 16 - Parliament meets for first time in 2010 and its speaker asks President Ahmed to form a new government. Sharmarke says his government stays put.
May 17 - Ahmed says he will appoint a new prime minister, seen as a move to clear the way for a more stable government. Sharmarke stands his ground.
May 20 - Ahmed reinstates PM and entire cabinet.
July 11 - Somali Islamists carry out two bomb attacks that kill 79 people in Kampala, Uganda as soccer fans watched the World Cup final. Al Shabaab claimed responsibility in revenge for Uganda's contribution to a peacekeeping force in Somalia.
Sept 21 - Sharmarke resigns, paying the price for the government's failure to rein in the insurgency that has killed at least 21,000 people. (Writing by David Cutler, London Editorial Reference Unit);