Nigerian President Goodluck Jonathan has declared a state of emergency in parts of the country following attacks from the Islamist group Boko Haram.
The measure is in force is areas of the Yobe and Borno states in the north-east, Plateau state in central Nigeria and Niger state in the west.
International borders in the affected areas have been temporarily closed.
In separate clashes, at least 50 people have been killed in the east of the country over a land dispute.
A government spokesman said the violence in the state of Ebonyi was the result of a land dispute between the Ezza and Ezilo peoples. Regional presence
Mr Jonathan vowed to "crush" Boko Haram, which killed dozens in attacks across the country on Christmas Day.
Announcing the state of emergency in a live televised address, Mr Jonathan said: "The temporary closure of our borders in the affected areas is only an interim measure designed to address the current security challenges."
There is growing concern that Boko Haram has developed a presence across the region.
Earlier this week, leaders of neighbouring Chad and Cameroon were reported to have held talks about how they can help prevent the violence spreading to their countries.
Mr Jonathan's announcement means parts of Nigeria's border with Niger, Chad and Cameroon will be sealed until further notice.
The president added that his chief of defence staff had been instructed to take other "appropriate" measures, including setting up a special counter-terrorism force.
The BBC's Tom Oladipo in Lagos says Mr Jonathan has been under increasing pressure to address the violence, and this announcement reveals his toughest stance so far.
Boko Haram is thought to be responsible for a string of major attacks across Nigeria this year.
It bombed the headquarters of the UN in August 2011, leaving at least 21 dead and has targeted police as well. It has also in the past targeted Muslim leaders.
At least 42 people died in the Christmas Day bombings of churches and other targets. Tens of thousands of people have fled their homes in Maiduguri in Borno State, as well as other cities. 'Cancerous'
Earlier on Saturday, speaking at a church in the capital Abuja where 37 people died, the president said Boko Haram had "started as a harmless group" but had "now grown cancerous".
"Nigeria being the body, they want to kill it," Mr Jonathan added. "But nobody will allow them to do that." Map
While offering his condolences to victims' relatives at St Theresa's Church in Abuja the president said: "We will crush the terrorists. If there are institutions... which are harbouring terrorists, we will deal with them."
Boko Haram, which originated in Maiduguri, wants to impose strict Sharia law across Nigeria.
Earlier this week, Nigeria's main Christian group warned that the community might have to defend itself if the security forces could not protect it.
Analysts said the move raised the spectre of communal clashes in Africa's most populous nation, which is divided between a largely Muslim north and a mainly Christian and animist south.
Analysis
All four states involved were targeted during the Christmas Day bombings carried out by Boko Haram, which killed at least 40 people.
The armed forces will provide a special unit with "dedicated counter-terrorism responsibilities" to be deployed to these states.
The land borders of the affected local government areas in these states will be closed temporarily to prevent cross-border security threats, although it is not clear how this will be enforced and if people will be able to leave to seek safety in other states.
President Goodluck Jonathan has been under pressure to bring an end to the attacks, and the announcement of the state of emergency indicates his toughest move so far in an attempt to suppress Boko Haram.
The last state of emergency was issued by former president Olusegun Obasanjo in 2006 in Ekiti State in south-west Nigeria, following the impeachment of the state governor.