Army officials said yesterday the operation to free the captives took place in the town of Dikwa in Borno State, which had fallen to Boko Haram twice since April, and was recaptured by Nigerian troops last week.
"As a result of ongoing operations under the aegis of Operation Lafiya Dole to clear Dikwa and its environs from Boko Haram... (the) Nigerian Army yesterday rescued 30 persons from the hands of the terrorists," army spokesman Sani Usman said in a statement.
Dikwa is located around 90 kilometres (56 miles) east of Borno state capital Maiduguri.
Earlier yesterday (Tuesday), 11 Boko Haram militants were killed in clashes with the military in a village in southern Borno state, a local resident and a member of the militia fighting alongside the army said.
Three militia fighters were also killed in the battle.
"On Monday afternoon around 2:00 pm (1300 GMT), Boko Haram gunmen on motorcycles attacked our village," said Markus Yohana, a local militia member fighting the Islamists in the village of Dille.
Another local, Bitrus Damina, confirmed the account.
"Soldiers went after them and killed 11 of them in the bush," Damina said.
Boko Haram has stepped up its attacks since Nigeria's new president Muhammadu Buhari was sworn in May.
The wave of violence has claimed 830 lives in just two months, dealing a setback to a four-country offensive launched in February that had chalked up a number of victories against the jihadists.
