Fighters from the Islamist insurgent group Al-Shabaab have killed at least 19 civilians in a night-time attack in central Somalia, clan chiefs and local officials said on Saturday.

The attack comes two weeks after Al-Shabaab, which has waged a long insurgency against the Somali state, besieged a hotel in the capital Mogadishu for 30 hours, leaving 21 people dead and 117 injured.

The sources said at least eight vehicles were travelling on a road between the towns of Beledweyne and Maxaas when the insurgents intercepted and burned them and killed the passengers overnight Friday to Saturday by Afar-Irdood village.

"The terrorists massacred innocent civilians who were travelling... last night. We don't have the exact number of victims, but 19 dead bodies have been collected," local clan elder Abdulahi Hared told AFP.

"The dead bodies are still being collected, including women and children. They could be more than 20," said Ali Jeyte, the governor of the Hiiraan region where the attack happened.

"This was a horrible attack that has never happened in our region. These were innocent civilians who did nothing to deserve this," added another local clan leader, Mohamed Abdirahman.

Al-Shabaab in a statement said they targeted fighters from a local sub-clan that recently helped government forces and that they killed 20 "militiamen and those who were transporting material for them", destroying nine of their vehicles.

Local fighters and the security forces recaptured several villages from Al-Shabaab in the region in late August.

Ali Gudlawe, president of Hirshabelle state where the attack took place, released a statement offering condolences to the victims' loved ones and promising to continue "operations to cleanse" the region of Al-Shabaab.

"The only way we have is to be united to fight and liberate our country from them. I call upon the society not to be discouraged," said his counterpart in Jubaland state, Ahmed Madobe.

The Al-Qaeda-linked group has been fighting Somalia's internationally backed federal government since 2007.

It has been driven out of the country's main cities, including Mogadishu in 2011, but remains a serious security threat in large areas of the countryside.

Somali President Hassan Sheikh Mohamud, elected in May after a protracted political crisis, promised to wage "an all-out war" to eliminate Al-Shabaab following the Mogadishu hotel attack.

The bloody siege drew international condemnation from partners including the United States, Britain, Turkey and the United Nations.

After Mohamud's election, President Joe Biden said he would restore a US military presence in Somalia to fight Al-Shabaab.

The Pentagon had recommended the move, considering the rotation system of Biden's predecessor Donald Trump as too risky and ineffective.