Nigeria's army said Saturday it had launched an operation in the northern city of Maiduguri, the bastion of Islamist group Boko Haram, that led to the deaths of 20 suspected militants and two soldiers.
The soldiers Friday stormed a location where some Boko Haram men were found and "we exchanged fire with them and about 20 of them died in the crossfire. We also lost two of our soldiers while three were injured," said army spokesman Lt Colonel Sagir Musa.
"We have also arrested 25 Boko Haram terrorists," he added.
The operation took place several hours after Nigerian President Goodluck Jonathan left Maiduguri, on his first visit to the restive city since his election in 2011.
Maiduguri has been the epicentre of an Islamist insurgency that has left hundreds of people dead and Jonathan on Friday defended the deployment of soldiers to the region.
Human Rights Watch said in a report released last year Nigeria's security forces may have committed crimes against humanity during operations aimed at crushing the insurgency.
The military has been accused of firing on unarmed civilians and razing neighbourhoods following suspected Islamist attacks, while Maiduguri residents also face roadblocks and rolling curfews in several areas.
"We always tell the soldiers to conduct themselves" professionally, Jonathan said.
Violence linked to Boko Haram's insurgency in northern and central Nigeria has left some 3,000 people dead since 2009, including killings by the security forces.
Boko Haram has said it is fighting to create an Islamic state in the predominately Muslim north of Africa's most populous country.