Nigerian President Goodluck Jonathan on Saturday declared a state of emergency in areas hard hit by violence blamed on Islamist sect Boko Haram and ordered the closure of part of the country's borders.
He announced the measures after branding Boko Haram a "cancerous" body that was bent on destroying Africa's most populous country and vowing that the group blamed for a wave of bloody attacks would be crushed.
"While the search for lasting solutions is ongoing, it has become imperative to take some decisive measures necessary to restore normalcy in the country especially within the affected communities," Jonathan said in a nationwide broadcast.
"Consequently, I have... declared a state of emergency in the following parts of the federation," he said, listing parts of the states of Borno, where Boko Haram traditionally has its base, as well as Yobe, Niger and Plateau.
He also ordered the closure of the land borders of the affected areas to control "cross-border terrorist activities".
Later Saturday at least 50 people were killed in clashes between two neighbouring communities in Nigeria's southeastern Ebonyi state, a government spokesman said, but the clashes were not linked to attacks by Boko Haram, he added.
"Upward of 50 people were killed when a group of people from Ezza community attacked residents of neighbouring Ezilo community over a land dispute," Onyekachi Eni told AFP by telephone.
"The dispute between the two communities, which started in 2008, was believed to have been settled until the latest conflagration. A group of people from Ezza invaded Ezilo and attacked them, killing over 50 people there," he said.
Jonathan's earlier comments on Boko Haram were made on a visit to a Roman Catholic church in Madalla, near the capital Abuja, where 44 people leaving a mass were killed in a Christmas Day bombing claimed by the group.
During his address in the church, many worshippers cried uncontrollably, including two women who lost their husbands and four children in the Christmas Day bombing.
The parish priest, the Reverend Father Isaac Achi, said the church had forgiven the attackers.
"On behalf of the whole Christians in this country and Christ lovers... we have forgiven them from the bottom of our hearts. We pray that such thing will not occur again in any place in this country," he said.
Jonathan said the state of emergency was necessary "as terrorists have taken advantage of the present situation to strike at targets in Nigeria and retreat beyond the reach of our law enforcement personnel."
Nigeria has been hit by scores of attacks blamed on Boko Haram, but a wave of Christmas Day bombings particularly targeting churches which killed at least 49 people set off fear and deep frustration nationwide.
"(Boko Haram) started as a harmless group... they have now grown cancerous," Jonathan said.
"And Nigeria, being the body, they want to kill it. But nobody will allow them to do that."
The latest wave of attacks also sparked fears of potential reprisals by Christians, and Christian leaders warned that they would be forced to defend themselves if the authorities did not address the spiralling violence.
Nigeria, also Africa's largest oil producer, is roughly divided between a mainly Muslim north and predominately Christian south.
The areas affected by the state of emergency are within Borno state, where Boko Haram has traditionally had its base, and neighbouring Yobe state in the northeast.
The other two areas are in Plateau state, in the country's middle belt dividing the north and south, and Niger state, which is next to the Federal Capital Territory, which includes Abuja.
Borders affected included those in the northeast, where Nigeria shares frontiers with Cameroon, Niger and Chad.
A special military counter-terrorism force would also be set up, Jonathan announced.
National Security Adviser Owoye Azazi told reporters that the state of emergency would last "until the situation improves".
Nigeria already has a number of military task forces operating in troubled regions, including Borno and Plateau states.
But the task force in Borno has been repeatedly accused of abuses, including killing civilians and burning homes after bomb attacks.
Hundreds of people have been killed this year alone in attacks blamed on Boko Haram. Most have been in the northeast, but it also claimed the August suicide bombing of UN headquarters in Abuja that killed at least 25 people.
An early version of the group formed in 2004, though it has taken on different forms since that time. It launched an uprising in 2009 put down by a brutal military assault which left some 800 dead.
While Boko Haram initially sought the creation of an Islamic state in the north of Nigeria, a number of people have since claimed to speak on its behalf and issued a range of demands.
It is believed to have several factions, including those with political links as well as radical Islamist cells.
There has been intense speculation over whether it has formed links with outside extremist groups, such as Al-Qaeda's north African branch.