At least 30 Ethiopian troops were killed Thursday in an attack on a base for African Union peacekeepers in central Somalia, a Somali military official said.

A suicide bomber detonated his explosives-laden vehicle early Thursday at the gates of the Ethiopian military base there before gunmen entered the base, said Mohamed Mohamud, a military officer in the town of Halgan, where the attack happened.

The death toll is likely to rise, he said.

The Islamic extremist group al-Shabab claimed it had killed 43 Ethiopian soldiers in the attack.

But the Ethiopian Communications Minister Getachew Reda told The Associated Press that the assault was repelled and that more than 100 of the attackers were killed. He did not say how many Ethiopians were killed or injured.

Ethiopian troops are pursuing the militants who fled led during the firefight, he said.

The African Union peacekeeping mission in Somalia, known as AMISOM, said on Twitter that there had been attempted attack on a base run jointly by the Somali national army and African Union peacekeepers. The attackers were "successfully repulsed" and some of their weapons seized, it said.

Al-Shabab, which has ties with al-Qaida, is fighting to impose a strict version of Islam in this Horn of Africa nation. Despite losing a lot of ground in recent years, the armed group continues to carry out lethal attacks in many parts of the country, including near the seat of government in the capital Mogadishu.

African Union peacekeepers are trying to prevent al-Shabab from threatening the authority of the weak, Western-backed federal government in Mogadishu. Some recent attacks by al-Shabab, which opposes the presence of foreign troops in Somalia, have targeted peacekeepers.