Islamist insurgents launched multiple attacks on government bases and African Union peacekeeping troops Friday and at least 19 people, including women and children, were killed in the heaviest fighting in a day seen in Somalia's capital in months.

The battle came two days before President Sheik Sharif Sheik Ahmed marks his first year in power and underscored that his goal of ending violence in a nation shattered by nearly two decades of war remains as elusive as ever.

More than 30 people were wounded in the hours-long fighting, said Ali Muse, the head of the ambulance service in Mogadishu. Residents cowered in their homes, unable to venture out as the warring sides pounded each other with artillery, mortars and machine guns.

Sheik Ali Mohamud Rage, a spokesman for the insurgent al-Shabab group, said the early morning attacks were aimed at pre-empting an anticipated offensive against the Islamist militia, which controls much of southern regions, most of the capital and some central regions.

Rage said two fighters al-Shabab fighters were killed. Barigye Bahoku, spokesman for the AU peacekeepers, said one of the force's 5,100 soldiers was injured. Muse said women and children were among those killed but didn't know how many.

Somali police spokesman Col. Abdullahi Hassan Barise said the insurgent attack was beaten back.

After a lull throughout the day, fighting resumed for about 30 minutes Friday evening. Gunshots could be heard in the southern part of Mogadishu.

Ahmed Hassan said mortar shells hit the homes of his neighbors, killing four of them. Hassan said he and other men moved the bodies away from the wreckage to another house nearby. He also said there were five people wounded, but they could not take them to a hospital because it was night and it wasn't safe to move around.

When Ahmed was sworn in on Jan. 31, 2009, world leaders touted his government as the "best option" for Somalia. At the time, Ahmed was co-leader of an Islamic insurgency and there was hope he and his supporters would be able to draw in more of the Islamists and help stabilize the capital, which has been the epicenter of the Somali conflict.

Foreign governments in April pledged more than $250 million in money and resources for Somalia's fledgling security forces, but only a third has been delivered.

Ahmed has been unable to ride a groundswell of support to put pressure on the insurgents and hasn't established a national security force capable of defeating them, analysts say. Al-Shabab, which the U.S. State Department has designated as a terrorist organization with links to Al Qaeda, and its Islamic Party ally strike government forces and installations and AU bases almost at will.

"The key problem facing Ahmed's government is the lack of a reliable force," said Rashid Abdi of the International Crisis Group.

The current army and police force has a reputation for corruption, with members even setting up extortion checkpoints in government-controlled areas. They refuse to allow cars and people to pass without them paying a fee — a throwback to the days when Mogadishu was divided among warlords whose militiaman extorted money at checkpoints.

Ahmed's government can't pay its own security forces regular salaries because donors have been slow to release money, but when money does come in officials allegedly pad the payroll with nonexistent personnel.

Abdi said the government must create a highly trained, highly motivated force with enough resources and regular salaries.

Somalia's humanitarian crisis, meanwhile, has gotten worse.

The number of Somalis who need humanitarian aid has swelled from 1.8 million in January 2008 to 3.6 million today even as the lack of security, particularly in southern Somalia, has forced many aid agencies to suspend operations. Earlier this month, the U.N. food agency suspended distribution of desperately needed aid because of attacks on its staff.