Hundreds of internally displaced people in northern Nigeria are returning home to the villages and towns they fled to escape the brutal onslaught of Boko Haram militants, the U.N. refugee agency reports.

And this, says UNHCR spokesman Leo Dobbs, is a matter of concern. The Nigerian armed forces have retaken many of those areas in northeastern Borno state, but the devastation inflicted on the villages under Boko Haram rule is widespread. Many of the internally displaced will face destroyed homes and infrastructure and areas that lack essential services.

Despite these dire conditions, Dobbs tells VOA that many of the people appear happy to be returning.

"They are citing … the conditions that they have been living under. They have been living in terrible conditions — many of them,” Dobbs said. “They are voting with their feet, as it were. But we want to stress that they need to have the right information. They should not be going back to areas which lack basic services, health care and where they can get food [and] potable water."

FILE - People stand outside burned houses following an attack by militants in Gambaru, a city in Nigeria's Borno state, May 11, 2014.

Security remains a major concern for the UNHCR. Although Boko Haram has been chased out of Borno state, Dobbs says aid agencies cannot move around without a military escort.

The UNHCR reports that most of the displaced are women, children and the elderly, who are particularly vulnerable to becoming sick and malnourished without shelter, health care, food and safe water. In addition, women and girls need additional protection, because they face increased risk of sexual abuse.

The UNHCR estimates that the Boko Haram insurgency has displaced more than 2.5 million people in northeastern Nigeria since 2014. This figure includes nearly 190,000 refugees in neighboring Cameroon, Niger and Chad.