BEIRUT — A devastating series of photographs from the Old City of Mosul published by the Associated Press on Friday lays bare the full horror of the battle to defeat the Islamic State for the ordinary people caught in its path.

Taken by photographer Felipe Dana, the images offer an up-close glimpse of the apocalyptic suffering being inflicted in the name of the war against terrorism, as well as the vast extent of the destruction being wrought.

The nine-month-old battle for Mosul is nearing a conclusion, and the militants are being defeated elsewhere. These photos raise the question: At what price?

Looking at the damage, it is astonishing that anyone has survived. Homes, shops, mosques and vehicles are reduced to rubble. Streets are impassable. No building is untouched.

Yet for months, people have been trapped here, under fire, with little access to food or medicine, being injured by bombs and airstrikes without doctors to treat them, and watching loved ones die, perhaps from wounds that needn’t have been fatal.

The Islamic State has compounded their misery by shooting at civilians who attempt to flee the inferno. One group is shown quivering with fear in a narrow alleyway as they attempt to reach Iraqi army lines.

In their faces are terror, pain and desperation — and recrimination. How could you do this to us, one bleeding woman seems to ask in another photo, as she clutches a small girl whose face has been gruesomely lacerated by shrapnel.

One photo struck me especially hard. It is of another little girl, wearing a grubby pink dress, who doesn’t appear to be injured. She is simply staring at the camera with an expression of bitter reproach, the rubble of Mosul stretching behind her.

Will we ever be able to repair these people’s homes? Find the means to put their lives back together? Summon the political wisdom to find a sustainable solution to the long-term grievances that fueled the rise of the Islamic State in the first place?

And perhaps the most disturbing question: Whose brutality will these people remember after the war has ended — the brutality of the Islamic State or the brutality of the war to reclaim their neighborhoods?

Here is a selection of the photographs. You can see the whole collection here.