BAGHDAD — It was weeks ago that Iraqi and United States officials declared the city of Ramadi liberated from the Islamic State, yet the fighting has dragged on in some neighborhoods. As Iraqi commandos advance slowly, house to house and under American air cover, hundreds of civilians are still fleeing the violence, many of them malnourished.

One of them is Abdul Hameed, who several days ago reached government lines. There, women and children are shunted to one camp, and the men to another to be interrogated about any possible ties to the Islamic State. After two days, he was let go, only to find that his 4-year-old son, Wisam, had died of dehydration.

“I do not know where to start and when to stop,” said Mr. Hameed, 41, reached by telephone Tuesday night from a refugee camp near Ramadi, when asked what his family had endured. “Only God knows about our suffering.”

The United Nations on Tuesday released one accounting of Iraq’s suffering: nearly 19,000 people killed, close to 40,000 wounded and more than three million displaced from their homes over a 22-month period that was marked, as the report described it, by a “staggering level of violence.” The report tracked casualties from January 2014, roughly when the Islamic State began seizing territory, through October 2015.