* Parts of border with Niger, Chad, Cameroon shut
* Special anti-terrorist squad to be set up
* Heavy security presence in central town of Jos (Adds clashes in southeast kill 50, last two paragraphs)
By Felix Onuah and Tim Cocks
ABUJA, Dec 31 (Reuters) - President Goodluck Jonathan declared a state of emergency on Saturday in parts of Nigeria plagued by a violent Islamist insurgency, and ordered shut the borders with Cameroon, Chad and Niger in the northeast.
Coming nearly a week after radical sect Boko Haram set off a series of bombs across Nigeria on Christmas Day, including one at a church that killed at least 37 people and wounded 57, Jonathan told state television the measures would aim to restore security in troubled parts of Nigeria's north.
"The temporary closure of our borders in the affected areas is only an interim measure designed to address the current security challenges and will be resumed as soon as normalcy is restored," he said.
He added that his chief of defence staff had been instructed to take other "appropriate" measures, including setting up a special counter-terrorism force.
The blasts have raised fears that Boko Haram, a movement styled on the Taliban and whose name means "Western education is forbidden", is trying to ignite sectarian strife in Nigeria, Africa's most populous nation and top oil producer.
Jonathan has been criticised by the opposition and Christian groups for what they said was a slow response to the bombings.
"The crisis has assumed a terrorist dimension," Jonathan said. "I therefore urge the political leadership (in northern local governments) to give maximum cooperation to ensure that the situation is brought under control."
He listed the northern local governments affected by the decree, including a part of Niger state near the capital Abuja, the northern half of the conflict-prone city of Jos, and parts of Yobe and Borno in the remote, semi-arid northeast.
The bombings by the northern-based movement have strained Nigeria's already fractious north-south divide.
Jonathan, a Christian from the south, upset many northerners by running for and winning the presidency in April, which in the eyes of many tore up a tacit deal to rotate the top job between a northerner and a southerner every two terms.
More than 500 people were killed in post-election violence in the north after Jonathan's victory, reflecting long-standing northern grievances about perceived alienation and exclusion by the central government from the fruits of national oil riches, concentrated in the south.
"CRUSH THE TERRORISTS"
Earlier in the day, Jonathan visited the scene of the deadliest Christmas attack, on St. Theresa's Catholic church in Madalla, on the outskirts of Abuja.
"We will crush the terrorists. If there are institutions ... which are harbouring terrorists, we will deal with them," he told weeping relatives of the victims gathered in the church, amid tight security by dozens of armed soldiers.
Traces of the devastation were still evident, with the church windows shattered and glass on the ground.
National Emergency Management Agency (NEMA) spokesman Yushua Shuaib said authorities were on "full alert" for more attacks.
"The government has put security throughout the federation, including near the flashpoints. We are optimistic, but we are fully mobilised," he told Reuters.
The government held an emergency meeting with security officials on Thursday and is also looking at using other channels to stop the conflict, which started as a local northern problem but is fast destabilising the whole country.
National Security Adviser General Owoye Andrew Azazi told Reuters the security services were considering making contact with moderate members of Boko Haram via "back channels", even though explicit talks are officially ruled out.
In Jos, which was also bombed at Christmas, two dozen armoured personnel carriers were patrolling the streets ahead of New Year celebrations.
The commissioner of police for Plateau state, Dipo Ayeni, told Reuters: "We have deployed this tactic of a show of force so that we can celebrate the New Year without any hindrance, and so there should be no cause for panic."
"The events that caused Nigeria's civil war are repeating themselves," said Uche Udemezue, an Igbo woman in the southeast, referring to the secessionist war of her people against northern rulers in which more than a million people were killed in the late 1960s.
"The north should know nobody has a monopoly on violence."
Attacks in and around the capital - including one on the U.N. headquarters in August that killed at least 24 people - suggest Boko Haram is trying to raise its jihadist profile.
In a separate, unrelated incident, clashes between rival ethnic groups in southeastern Nigeria's Ebonyi state on Saturday killed at least 50 people, the state government spokesman said, and police said mobile units had been sent to the state to quell the violence.
There was no suggestion they had anything to do with wider security problems, but the clashes are likely to add to Jonathan's woes at a time when his forces are already stretched. (Additional reporting by Tife Owolabi in Jos and Anamesere Igboeroteonwu in Onitsha; Writing by Tim Cocks; editing by Tim Pearce)