* 219 girls abducted by Islamist rebels still missing
* Bombs have killed scores in past month
* Northeast already under a state of emergency
Speaking on Nigeria's Democracy Day, Goodluck Jonathan 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 northeast, is defeated.
"I am determined to protect our democracy, our national unity and our political stability, by waging a total war against terrorism," Jonathan said in a televised speech.
It was not immediately clear what such an offensive might entail, given that the northeast 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.
Chad's President Idriss Deby also used the phrase "total war" after neighbouring West African states met in Paris in mid-May to seek a common strategy to fight the militants.
"I assure you that Nigeria will be safe again and that these thugs will be driven away. It will not happen overnight, but we will spare no effort to achieve this goal," Jonathan said.
The scale of the challenge was underlined by a fresh attack on Thursday in the northeastern village of Gurmushi, near Nigeria's border with Cameroon, in which suspected Islamist gunmen riding motorbikes killed 32 people.
On April 14 Boko Haram militants surrounded a secondary school in the remote northeastern village of Chibok and took away in trucks 276 girls who had been sitting exams, according to official figures from an audit this week.
Nigeria's Borno state, the epicentre of the insurgency, said on Wednesday that 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.
Since the day of the girls' abduction, Boko Haram have killed at least 500 civilians, according to a Reuters count.
"With the support of Nigerians, our neighbours and the international community, we will reinforce our defence, free our girls and rid Nigeria of terrorists," Jonathan said.
"I share the deep pain and anxiety of their parents."
The mass abduction thrust the Islamist insurgency into the international spotlight like never before, with a Twitter campaign #BringBackOurGirls drawing in U.S. First Lady Michelle Obama and Hollywood star Angelina Jolie.
Capitalising on this, Jonathan has sought to paint Boko Haram as part of a broader global jihadist movement being directed from abroad, the first time he has taken this line.
"Extremist foreign elements, collaborating with some of our misguided citizens," was one phrase he used to describe them.
"What we are witnessing in Nigeria today is a manifestation of the same warped and ferocious world view that brought down the Twin Towers in New York (and) killed innocent persons in Boston," Jonathan said, referring, respectively, to the September 11, 2001 attacks and the April 2013 marathon bombing.
Scores have been killed in Nigerian bombings in the past month, including two in the capital Abuja.
But signalling a willingness to negotiate, Jonathan said: "our doors remain open to them for dialogue and reconciliation."
Chief of Defence Staff Air Marshal Alex Badeh said on Tuesday the military knew where the abducted girls were but ruled out a rescue by force for fear of endangering them. The military was criticised for its slow response to the crisis, but Jonathan has accepted international help.
U.S. troops have deployed to Chad on a mission to find the girls, and surveillance drones are being used.