* Boko Haram wants to impose sharia Islamic law
* Government has so far failed to quell insurgency
MAIDUGURI, Nigeria Dec 28 Gunmen killed five people in Nigeria on Friday, including a policeman, on the edge of the town of Maiduguri, a long-time stronghold of Islamist sect Boko Haram, the military said.
Boko Haram, which is loosely based on the Afghan Taliban, has killed hundreds this year in a campaign to impose sharia, Islamic law, in Nigeria, a country of more than 160 million split roughly equally between Christians and Muslims.
The sect is the biggest threat to stability in Africa's biggest oil exporter.
"Five people have been killed by unidentified gunmen in Musari ... in the early hours," Sagir Musa, a spokesman for the military Joint Task Force (JTF), told Reuters.
"The JTF response team that went to the area between 1-3 a.m arrested three of the gunmen and recovered weapons."
Maiduguri, in the far northeast of Africa's most populous nation, has been a hotbed of violence, directed mostly at the security forces, since an uprising by Boko Haram in 2009.
Seven people were murdered by unidentified attackers on Wednesday in Maiduguri, the police said.
The army also said soldiers had killed five "suspected terrorists" and destroyed a bomb-making factory on Thursday in the northern city of Kaduna, where Boko Haram is active.
on Tuesday, gunmen killed six people at a church in the northeast town of Potiskum, the third year running that Christmas services have come under deadly attack.
However, the attacks have not been on the scale of the previous two Christmases when dozens were killed in bomb and gun strikes, and security has been tightened throughout the north of Nigeria.
Boko Haram's insurgency intensified after President Goodluck Jonathan, a southern Christian, won election in April last year.
Jonathan has been unable to stop the rebellion despite waves of military offensives in the northeast and other parts of northern and central Nigeria where Boko Haram has a strong presence.
Western governments are increasingly concerned about Islamists in northern Nigeria linking up with outside groups, including al Qaeda's north African wing.
Islamist group Ansaru, known to have ties with Boko Haram, appears to have become more active in recent weeks. It claimed an attack on a major police barracks in the capital Abuja last month, where it said hundreds of prisoners were released.
The group, which has been labelled a "terrorist group" by Britain, has also said it was behind the kidnapping of a French national last week. (Reporting by Ibrahim Mshelizza; Writing by Joe Brock; Editing by Andrew Osborn)