(CNN) -- Suspected Islamic insurgents fired mortar rounds at a plane carrying Somalia's transitional president, but no one -- including Abdullahi Yusuf Ahmed -- was harmed, a presidential spokesman said.
Somali President Abdullahi Yusuf Ahmed, pictured late last month during a visit to France.
The attack happened while the plane was about to take off from Mogadishu's airport Sunday around 11 a.m. local time, spokesman Hussien Mohammed Huubsireb said.
"Al-Shaabab has actually tried to harm to president, but thank God nobody was hurt," Huubsireb said.
Al-Shaabab is an Islamic militia that is trying to seize control of Somalia. It is a splinter group of the Islamic Courts Union, which ousted Somalia's transitional government in 2006. The ICU was deposed in December of that year following Ethiopia's military invasion.
Bloody battles between Al-Shaabab and the Ethiopian-backed government forces in Mogadishu have forced residents to flee the capital.
More than 40,000 displaced civilians have taken shelter in dozens of makeshift settlements west of Mogadishu, described by the United Nations as "precarious conditions."
Sunday's mortar attack is the second assassination attempt on Ahmed. The president survived a car bombing in September 2006 outside Somalia's parliament in Baidoa that killed at least eight others.
Somalia's Prime Minister Ali Mohamed Gedi has been more frequently targeted by the Islamic insurgents seeking to destabilize the government.
Somalia has been mired in chaos since 1991, when warlords overthrew dictator Mohamed Siad Barre and sparked brutal clan infighting. Somalia's current transitional government is trying to maintain control of the capital, with the help of the better-equipped Ethiopian forces.
But the presence of the Ethiopians has united various Islamic militant groups in Somalia, including Al-Shaabab, who are trying to oust the Ethiopian forces and gain control of Mogadishu.
The United States classified Al-Shaabab as a terrorist organization in March, partly because of what Washington says is the group's close ties to Osama bin Laden's al Qaeda militant group.
All About Somalia