(CNN) -- A militant Islamist group associated with al Qaeda attacked areas controlled by government troops and peacekeepers in Somalia early Friday, leaving 12 dead and scores injured, witnesses said.
Of the 12 killed, two were Al-Shabaab members, according to Sheik Ali Mohamud Raghe, the militants' spokesman.
At least 30 people were wounded and the number is expected to go up, medical officials said.
The attack involved heavy artillery and automatic weapons. It started at 2 a.m. local time in the capital, Mogadishu, and targeted areas controlled by the African Union Mission for Somalia and government troops, according to Maj. Brigye Bahuko, an AMISOM spokesman.
A spokesman for the militants said they "inflicted heavy losses on AMISOM and government forces."
But Somali government officials downplayed the offensive, calling it "small and careless."
Areas attacked include Mogadishu's strategic "Kilometer Four," a square connecting the airport and the port. The square has been hit several times, but this attack is considered among the most severe. African Union peacekeepers from Uganda are stationed there.
Somalia has been mired in chaos since 1991, when warlords overthrew dictator Mohamed Siad Barre and sparked brutal clan infighting. The transitional government has struggled to establish authority amid challenges by militants.
The fighting comes almost a year since Sheikh Sharif Sheikh Ahmed was sworn in as the nation's new president.
Al-Shabaab is considered a terrorist organization by the United States, which blames it for shootings and suicide bombings inside Somalia.
The group has also threatened African neighbors, including Ethiopia, Djibouti, Kenya, Eritrea, Ghana, Sudan and Uganda.
CNN's Amir Ahmed and journalist Mohammed Amiin contributed to this report.