The former president of Somalia, Abdullahi Yusuf Ahmed, died in a hospital in the United Arab Emirates where he had been suffering from poor health.

He was 77 years old.

UN Special Representative of the Secretary-General for Somalia, Augustine Mahiga, extended his deepest condolences to the bereaved family and friends...and people of Somalia over his death.

Ahmed was elected president of Somalia's first Transitional Federal Government in 2004 and served for four years until he was pressured to resign in 2008. However, his political activism and leadership extended well beyond his time as president.

Agence France-Presse described him as authoritarian and he led a tumultuous life, in which he survived two assassination attempts.

Ahmed was born in Somalia where he studied law and later went to train as an army officer in the Soviet Union and Italy.

In 1978 he led a rebel group in a failed attempt to overthrow Somali President Mohammed Siad Barre. He then was forced to flee to Kenya and Ethiopia before returning to a war-torn Somalia years later in 1990.

He was elected as president of Somalia in 2004, with support from Somali warlords who were seeking a strong leader.

During his presidency, he allowed forces from neighboring Ethiopia to enter Somalia to help protect his government against the Islamic Courts Union (ICU), an Islamist party quickly gaining influence in the country. This very controversial decision compromised his popularity in Somalia but won him initial support in the U.S.

The U.S., however, began to question his ability to stabilize the country and pressured him to resign in 2008. The New York Times in 2009 called Yusuf Ahmed an unreformed warlord widely reviled for his war-like ways.

However, his resignation did not lead to stability in Somalia as many, including the U.S., had hoped.

In fact, Ahmed's death coincidentally came at a high point in Islamist extremist violence in Somalia -- he died just days after al-Shabab, an Islamist militant group, launched mortars and shells on the Somalian presidential palace in Mogadishu.