The car bomb on Monday morning allowed the fighters to infiltrate the Lanta Buro base in Lower Shabelle region, a military officer, Said Mohamed Adawe, told The Associated Press.
"They are still in control of the base," a senior Somali military official said, insisting on speaking on condition of anonymity because he was not authorized to speak to the media.
The Somalia-based al-Shabab extremist group claimed responsibility for the attack, saying it killed 30 soldiers. Al-Shabab also targeted the camp last year with a similar attack, killing more than 15 soldiers.
Military officials said the attackers confiscated military vehicles and arms during the attack, which highlights the challenges facing the government and African Union forces in restoring peace and stability in the Horn of Africa nation.
Al-Shabab, which maintains a military presence largely in rural areas, has stepped up attacks on military bases across large parts of south and central Somalia.
The latest attack comes a few days after Somalia's armed forces chief warned troops of possible new attacks by "desperate" extremist fighters who lost key strongholds to Somali troops but later regrouped.