Nigeria’s military says it has taken control Bama a town in the North East of the country that was under the control of Boko Haram.
The army declared the victory saying several fighters were killed in the process.
It is continuing with its operation against the militants in Bama the second largest town in Borno state.
Boko Haram was reportedly also ousted from Goniri, its last base in neighboring Yobe state.
The group recently swore allegiance to the Islamic State militants based in Syria and Iraq an allegiance that was accepted by the ISIS.
The violence in Nigeria has killed more than 13,000 people since 2009.
The conflict has since spread to neighboring countries, including Chad and Cameroon.
Reports say Bama is an important town because of its closeness to the state capital Maiduguri and has witnessed some of the worst violence during this insurgency.
The town was attacked several times by the jihadists before they captured it six months ago, our correspondent says.
The military said those jihadists who fled Bama headed for the border with Chad and it had requested the Chadian army to pursue them.