Army spokesman Sani Usman says a unit freed the captives Tuesday during a raid on suspected Boko Haram camps along the edges of the Sambisa Forest, a longtime militant stronghold, in northeast Nigeria.
The statement from Usman says eight men, 138 women, and 192 children were rescued and taken to the town of Mubi.
There was no indication the “Chibok girls” kidnapped by Boko Haram from a school in April 2014 were among those freed.
Usman says the troops also killed 30 Boko Haram fighters and recovered some weapons and ammunition.
Nigeria’s military has claimed a series of successes against Boko Haram, but the group continues to carry out deadly attacks.
On Friday, suspected Boko Haram suicide bombers killed 42 people in attacks on mosques in Maiduguri, the largest city in northeastern Nigeria, and in Yola, 400 kilometers to the south.
President Muhammadu Buhari has given his military commanders until December to end the insurgency, which has killed at least 17,000 people and displaced more than 2.5 million since 2009.
The militant group is attempting to create a hardline Islamic state in Muslim-majority northern Nigeria.