(CNN) -- Somali government forces backed by forces from the African Union Mission in Somalia (AMISOM) forces took over a base used by al Qaeda-backed Al-Shabaab militants on the northern outskirts of Mogadishu, AMISOM said in a statement.
The based had been used to execute civilians suspected of being spies for the government and to launch attacks on the capital, accoding to AMISOM.
"Today's operation has successfully extended the city's defenses and will deny the terrorists important ground from which they have been attacking the population," said AMISOM Force Commander Maj. Gen. Fred Mugisha in a statement about the operation, which occurred Friday in Maslah.
Two AMISOM soldiers were wounded in the operation, he said.
Maslah has been the site where, since 2008, extremists have executed civilians by firing squad, in some cases hacking limbs from their bodies, making it one of the most feared militant bases in Mogadishu, residents say.
Al-Shabaab, a militant Islamist group that controls much of southern Somalia and is active around the capital, Mogadishu, has waged an insurgency against the weak Transitional Federal Government since 2007.
Since last August, AMISOM has helped clear Al-Shabaab militants from their bases within the capital. Friday's seizure of the base gives full control of Mogadishu to AMISOM and the Somali government, according to the government.
"This is the last base that we are capturing from Al-Shabaab and today Mogadishu is the hands of the Somali government forces and we shall continue fighting until we shall eradicate the extremist in our country as whole," said Abdikarin Yusuf Aden, a Somali government commander.
But control does not mean violence has ended. On Friday, a car laden with explosives blew up in the south of Mogadishu, killing the driver, who was the sole occupant. The driver was an Al-Shabaab member, according to security sources who spoke to state radio.
Somali state radio also reported that the explosion occurred near the former campus of Gaheyr University which now houses civilians and government soldiers.
Over the past six months, as violence has waned, Somali leaders have reached agreement on the peace process and the reformation of the Somali state.
Last week, the U.N. Security Council passed a resolution raising the AMISOM troop ceiling to 17,731 and allowing for the integration of Kenyan forces.
Friday's incident completes an operation that began last year, when Al-Shabaab suffered a series of reverses in Mogadishu, with a senior figure being killed at a roadblock and AU troops pushing the group out of several neighborhoods.
The group has been on the defensive in its heartland in southern Somalia. Blaming Al-Shabaab for the abductions of several foreigners in northern Kenya, the Kenyan government ordered a cross-border incursion last October aimed at creating a security buffer in southern Somalia. That Kenyan operation is ongoing. Since it began, Ethiopian troops have joined Somali government units in attacking Al-Shabaab strongholds.
Around the capital, Al-Shabaab's tactical withdrawal from Mogadishu was followed by a rash of suicide attacks and ambushes as it lost ground.