They look calm, subdued. One young woman with a purple traditional hijab covering her head and upper body holds a baby. Few know what horrors they have been through or witnessed.

The military has released the first photos of what it says are some of the hundreds of women and children that troops freed in recent days in the Sambisa Forest amid heavy combat.

President Goodluck Jonathan, whose term ends this month, said Thursday that the Sambisa Forest is the last refuge for the militants and he pledged to "hand over a Nigeria completely free of terrorist strongholds."

The military says it is screening the girls and women to find out what villages they came from. Some women the soldiers tried to rescue even shot at their rescuers, a military spokesman has said, indicating that some might now identify with Boko Haram after months of captivity and forced marriages. It also remains unclear if some of the women had willingly joined Boko Haram, or are family members of fighters.

The photos, which the military said were taken on Wednesday and Thursday, show 20 or so women, children and babies looking generally healthy physically, though one child is thin.

There has been no announcement yet on whether any of those rescued are the students who were kidnapped from the Chibok school a year ago, a mass kidnapping that outraged much of the world.

Some photos were taken in an open courtyard with a high wall and leafy trees beyond. A military man in a flight suit, an assault rifle held by his side, stands among them. A young military medic with blue rubber gloves and a surgical mask dangling from his ears appears to be checking several of the children.

Muhammad Gavi, a spokesman for a self-defense group that fights Boko Haram, said some of the hundreds of women and girls who were freed are pregnant, citing information he got from some group members who have seen the females.

The Nigerian military first reported rescuing almost 300 women and children in the Sambisa Forest on Tuesday after deploying ground troops into the forest more than a week ago. The army spokesman, Col. Sani Usman, told The Associated Press on Thursday that more than 100 additional girls and over 50 more women have also been rescued.

He said in a statement that several lives were lost, including that of a soldier and a woman, during shootouts in nine separate extremist camps in the forest.

Some captives have reportedly become indoctrinated into believing the group's Islamic extremist ideology, while others established strong emotional attachments to militants they had been forced to marry.

The military initially appeared incapable of curbing Boko Haram as the insurgents took control of a large swath of northeast Nigeria last year and declared it an Islamic caliphate. That changed when the military received helicopter gunships and heavy arms and some neighboring nations launched an offensive against Boko Haram at the end of January.

President Jonathan lost March 28 elections, in part because of the military failures and a perceived uncaring attitude to the plight of victims of Boko Haram. Former military dictator Muhammadu Buhari won at the polls this time, and becomes president on May 29.