Nigeria's President Goodluck Jonathan has sacked his military top brass leading the fight against Boko Haram, following a court judgment that their appointment was illegal.
The heads of the country's army, navy and air force have all been replaced, according to a statement from the president's office on Thursday.
Defence spokesman Chris Olukolade said the decision would not affect the conflict with Boko Haram, which is now in its fourth year.
"Military operation is a continuum," he told the AFP news agency. "The new military chiefs will be briefed adequately by their predecessors and the operation will continue as planned."
The sackings came after Festus Keyamo, a human rights lawyer, last year mounted a legal challenge to the officers' appointments, arguing they were not approved by the national assembly, as demanded by the constitution.
A judge in the High Court in Abuja declared last July that the appointments violated section 18 of the Armed Forces Act 2004. The law intends "to subject the armed forces to civil authority", Keyamo said, adding that neither the president nor the service chiefs were constitutionally superior to the national assembly.
Keyamo said on Thursday that he had been "absolutely vindicated".
Nigeria's military meanwhile said that Boko Haram fighters had been killed in clashes in the Banki area of northeastern Borno state, near the border with Cameroon.
"Many of the terrorists (Boko Haram) were killed in the fighting. I don't have a precise figure," said Olukolade, adding that two soldiers died.
Borno state police commissioner Lawan Tanko confirmed the target was a police station in Banki and one police officer died.
Witnesses said Boko Haram fighters also shot locals and burnt houses. Police in the far north of Cameroon and the country's state radio reported earlier that about 15 people were killed, four of them soldiers, and the rest civilians.