Boko Haram gunmen killed 35 people in attacks on three villages in Nigeria's north-east Borno state near the border with Cameroon, a military source and residents said.

Dozens of Boko Haram gunmen dressed in military uniform stormed Gumushi, Amuda and Arbokko opening fire on residents and torching homes with petrol bombs, they said.

Local media put the death toll in Gumushi at 42.

Witnesses said the gunmen also launched coordinated attacks on the neighbouring farming villages of Amuda and Arbokko, 125km from Maiduguri, killing nine people and destroying scores of houses.

Boko Haram which means "Western education is forbidden", has stepped up deadly raids in northeast Nigeria in recent months, pillaging and burning entire villages and killing residents as part of its five-year-old campaign to establish an Islamic state in the north.

Violence blamed on the Islamist group has killed thousands since 2009.

News of the latest deadly raids came on the same day as Nigeria's President Goodluck Jonathan vowed a "total war against terrorism".

Speaking on Nigeria’s Democracy Day, Goodluck Jonathan sought to reassure the parents of 219 schoolgirls being held by the group that their children would be freed.

He said he had authorised security forces to use any means necessary under the law to ensure that Boko Haram, which operates in the country's north-east is defeated.

"I am determined to protect our democracy, our national unity and our political stability, by waging a total war against terrorism," Mr Jonathan said.

It was not immediately what such an offensive could entail given that the north-east of the country has been under a state of emergency and a full scale military operation for a year.

Nigerian forces are also hugely overstretched.

The phrase "total war", however, was used by Chad's President Idriss Deby following a meeting of Nigeria's neighbours in Paris in earlier this month, in which they sought a common strategy to fight the militants.

"I assure you ... that these thugs will be driven away. It will not happen overnight, but we will spare no effort to achieve this goal," Mr Jonathan said.

On 14 April Boko Haram militants surrounded a secondary school in the remote north-eastern village of Chibok and took away 276 girls who had been taking exams in trucks, according to official figures from an audit this week.

Nigeria's Borno state, which is at centre of the insurgency, said yesterday a total of 57 of the kidnapped girls had escaped.

But 219 others were still missing and assumed held by the militants, who say they are fighting for an Islamic state in Nigeria and have killed thousands over the years.

"With the support of Nigerians, our neighbours and the international community, we will reinforce our defence, free our girls and rid Nigeria of terrorists," Mr Jonathan said.

"I share the deep pain and anxiety of their parents," he added.