Hard-line Islamist al-Shabaab fighters conduct military exercise in northern Mogadishu.

Mogadishu - A truck bomb targeted an Ethiopian military base inside Somalia, and Islamist militants claimed responsibility for the attack.

An al-Shabab spokesman said the group carried out on Tuesday's successful martyrdom operation against what it called “Ethiopian invaders” in the western Somali town of Beledweyne. The militant group claimed that the blast killed a high number of Ethiopian troops, but there was no confirmation of a death toll from officials.

A shopkeeper in Beledweyne, Abdullahi Ali, said he saw a truck with the back covered in black cloth or tarpaulin speeding toward the base and then heard a large explosion. Resident Ali Hussein said he could see smoke rising from the base but that Ethiopian troops cordoned off the area and the extent of casualties was not known.

The number of dead or injured from Tuesday morning's bombing may never be known. The Ethiopian military rarely discloses such figures. Al-Shabab on its Twitter feed claimed that 33 Ethiopian troops were killed in the attack.

Large numbers of Ethiopians entered Somalia last month to help the weak UN-backed government defeat al-Qaeda-linked insurgents. Beledweyne is near the two countries' joint border.

Meanwhile, in the capital, the UN's special representative to Somalia moved his office to Mogadishu for the first time since 1995. Augustine Mahiga said that he hopes the move marks the start of renewed hope for the future of Somalia, which hasn't had a fully functioning government in more than two decades.

The UN' top representative hasn't been based in Somalia for so long because of security concerns. But gains by Ugandan and Burundian troops fighting al-Shabab under an African Union mandate have made significant progress against militants over the last year.

“Without the incredible efforts and sacrifice of the troops from Somalia and other African countries, we would not be here today,” said Mahiga.

Mahiga said that being in the Somali capital will allow the UN to work more closely with the country's Transitional Federal Government. The government's mandate is up in August.

Mahiga was previously based in Nairobi, the capital of neighbouring Kenya. Several other UN agencies have already had a permanent presence in the Somali capital for over a year. But the last UN special representative based in Somalia left the country in 1995.

Somalia has been pressing the United Nations for years to relocate its political office from Nairobi to Mogadishu. Somali residents welcomed the return of the UN's top Somalia official.

“I am so happy to hear they are back again. It's a morale-boosting chance,” Hassan Muhummed said. - Sapa-AP