Boko Haram militants
Boko Haram militants are claimed to be behind the suicide attack in ChadReuters

About 40 people have been killed by suspected Boko Haram militants who torched houses and shot people as they fled in two villages in northeast Nigeria's Borno state, witnesses told Reuters on Wednesday.

The attackers, who arrived on motorcycles and vehicles mounted with guns, shot residents and looted shops in the villages of Debiro Biu and Debiro Hawul late on Monday night and into Tuesday morning, the witnesses said.

Local police confirmed the attacks took place but declined to comment further.

Details of the attack did not emerge for several hours due to poor telecommunications networks in the remote villages in northeast Nigeria, a region in which Boko Haram has killed thousands in a six-year bid to set up an Islamic state.

"They were shooting sporadically and then they started looting shops and setting places ablaze," said witness Hussaini Adamu, who fled with other villagers to hide in bushes after fleeing Debiro Biu.

More than 100 people have been killed in northeast Nigeria in the past few weeks in a spate of bombings, mostly in Maiduguri, the capital of Borno state.

Muhammadu Buhari, the new president of Africa's most populous nation and biggest economy, made Maiduguri the command centre for the military campaign against Boko Haram after being inaugurated last month.

Buhari has held talks with counterparts in neighbouring countries to set up a joint force to tackle the insurgents.

Boko Haram controlled territory the size of Belgium in the northeast at the start of the year but has been pushed out of most of it by the Nigerian army, backed by troops from Chad, Niger and Cameroon.

In Washington, State Department spokesman John Kirby said the United States condemned the Boko Haram attacks and commended the military forces of Nigeria and the other countries for their advances against the group.

"We encourage the government of Nigeria to take steps to secure and govern liberated areas by filling in behind military successes with police and civilian administration," he said in a statement.