Islamic militants from the al Qaeda-linked al-Shabab group attacked a remote African Union base in Somalia Friday, beheading women and killing at least 30 people, officials and witnesses say.

In a tweet, the African Union mission confirmed there had been an early morning attack on their outpost in Lego, but did not provide any further details.

The militant Islamist group al-Shabab says its fighters have taken control of the base but that has not been confirmed.

"During the attack they also beheaded women and they are still control large parts of the area," Abdiqadir Mohamed Siidi told the Associated Press Friday. He declined to give more details about the casualties. Residents in Lego said that armed al-Shabab fighters are still patrolling parts of the village.

Lego residents reported seeing militants burning vehicles, carrying off weapons and removing the bodies of their fighters killed in the attack, the BBC reported.

Mohammed Haji, an official in the Lower Shabelle region told The AP by telephone that militants attacked the base entrance with a car bomb before gunmen began their assault. A suicide bomber drove into the main gates of the base, along the main road connecting the capital, Mogadishu and the city of Baido.

"They managed to infiltrate the entrance after the blast -- it was a complex attack," said. He estimated that up to 25 combatants may have been killed, but there was no way to verify his claim.

Lower Shabelle region governor said that a minister for the regional South-Western State and the commissioner of the village were now missing.

"The situation is still tense - Al-Shabab are back in control of Lego and arrested several people." said Mohamed Aden, a local elder by phone from Lego, with gunfire echoing in the background.

Al-Shabab, which vowed it would step up attacks during the Muslim holy month of Ramadan, claimed responsibility for the attack. The militants, who have ties with al Qaeda, have been pushed out of much of the territory they once controlled across the Horn of Africa nation, including Mogadishu. But they remain a lethal threat, carrying out guerrilla attacks on government and civilian targets.

The base is manned by Burundian soldiers from the African Union Mission in Somalia (Amisom), which has more than 20,000 troops in the country.

The U.N. special representative for Somalia Nicholas Kay and the African Union special envoy Maman Sidikou both condemned the attack.

Ambassador Sidikou said in another statement that the AU mission would continue its joint operation with the army.

"This attack will not dampen our resolve to continue to support the Somali Government and people until they are free from terrorism," he said.

The Associated Press contributed to this report.