By Abdi Sheikh and Feisal Omar

MOGADISHU (Reuters) - The Islamist group al Shabaab attacked a Somali military base southwest of the capital Mogadishu on Sunday night, killing at least one person and seizing vehicles and other equipment, the government and the militants said.

The attack on the base in Laanta Buuro, about 45 km (28 miles) from the capital, came shortly after African Union troops from Kenya said they had killed 34 al Shabaab militants in two separate incidents on Saturday and Sunday.

Somalia's government is battling to rebuild the Horn of Africa nation after more than two decades of conflict. Al Shabaab, which aims to topple the Western-backed government, ruled large parts of Somalia until 2011, when it was driven out of Mogadishu by African Union and Somali troops.

"The militants were so many, and well armed," military officer Abdullahi told Reuters on Monday. "The soldiers fled the base – only one soldier died – but (al Shabaab militants) took nine vehicles."

A spokesman for al Shabaab confirmed the attack, and said it had killed 70 men.

"We left only one truck that was burning. Seven of the vehicles we took had anti-aircraft guns fixed on," Sheikh Abdiasis Abu Musab, al Shabaab's military spokesman, told Reuters.

The militants often inflate casualty numbers and downplay the number of their own fighters killed.

(Editing by Edith Honan and Nick Macfie)