As his armored vehicle bounced along a dirt track carved through the ruins of this recently reconquered city on Wednesday, Gen. Ali Jameel, an Iraqi counterterrorism officer, narrated the passing sites. Here were the carcasses of four tanks, charred by the jihadists of the Islamic State.
Here, a police officer's home that the jihadists had blown up. Here, a villa reduced to rubble by an airstrike. And another. And another. In one neighborhood, he stood before a panorama of wreckage so vast that it was unclear where the original buildings had stood. He paused when asked how residents would return to their homes. "Homes?" he said. "There are no homes."
The retaking of Ramadi by Iraqi security forces last week has been hailed as a major blow to the Islamic State and as a vindication of the Obama administration's strategy to fight the group by backing local ground forces with intensive airstrikes.
But the widespread destruction of Ramadi bears testament to the tremendous costs of dislodging a group that stitches itself into the urban fabric of communities it seizes by occupying homes, digging tunnels and laying extensive explosives.
The United States-led coalition that is bombing the Islamic State, also known as ISIS or ISIL, says that the air campaign is working and that the group has lost 30 percent of the territory it controlled in Iraq and Syria. Iraq's prime minister, Haider al-Abadi, has vowed that 2016 will see the Islamic State "terminated in Iraq."
Still, the question looms of what such a victory would leave behind. The coalition's successes in Kobani, Syria, and Sinjar, Iraq, have also left communities in ruins, with few resources to rebuild. And defeating the Islamic State will require extracting it from the much larger cities of Raqqa, Syria, and Mosul, Iraq, as well as from many other towns and villages.
Iraqi officials said that their forces now held 80 percent of Ramadi, the capital of Sunni-dominated Anbar Province, and that fighting continued on the outskirts. During a visit on Wednesday to the city, about 70 miles west of Baghdad, the booms of artillery fire filled the air, followed by clouds of smoke rising on the horizon.
Two Iraqi attack helicopters circled, and jets from the international coalition growled overhead. Before the offensive, there were questions about what part of Iraq's security apparatus should lead the fighting.
The Iraqi Army, which lost the city to the Islamic State in May, is still lightly regarded. Shiite militias, which have proved effective in battles against the jihadists, are generally unwelcome in Sunni areas and have been accused by human rights groups of carrying out revenge attacks. In the end, it appears that heavy coalition airstrikes opened the way for the Iraqi Counter Terrorism Service, generally considered the country's most professional and capable security force.
Formed by the United States about a decade ago, and still receiving training and support from the American military, it operates exclusively under Mr. Abadi's office. The Iraqi Army had little presence, limited to staffing artillery posts and running checkpoints outside the city, some of which provocatively flew the flags of Shiite martyrs.
Nor was there much sign of the thousands of Sunni fighters recently trained by the United States to join the fight against the Islamic State. Iraqi and coalition officials said they were not considered combat troops, but were used to hold areas seized by other forces. The scars of war in Ramadi were visible just about everywhere. Many streets had been erased or remained covered in rubble or blocked by trenches used in the fighting.
To reach their command center in the city's southwest, Iraqi forces took a meandering, bumpy dirt track through neighborhoods full of collapsed homes, shrapnel-ridden shop fronts and swimming-pool-size craters left by airstrikes. One was full of green water, apparently from a damaged sewage line. Entire areas are considered no-go zones because they have yet to be searched for booby traps left by the jihadists.
Few civilians remain from a population that once numbered around 400,000, and the city lacks electricity and running water, meaning that supplies must be trucked in, leading to traffic snags between armored vehicles and water and fuel tankers.
Two rivers flow through the city, and the jihadists blew up bridges that connected neighborhoods as they withdrew, meaning that what used to be a short drive from one place to another now requires a long detour south of the city to cross a pontoon bridge the United States provided.
The route passes Anbar University, the walls of its buildings peppered with bullet holes, and leads to the government compound at the city's center, the capture of which by Iraqi forces on Dec. 28 led them to announce the city's liberation. It remains deserted, except for a contingent of Iraqi troops who do not wander around much because Islamic State fighters still hit it with mortar rounds.
The glass facade of its police station is shattered, and the police squat in a house farther from the front lines. On the roof of a villa that serves as a command center, an officer at a table covered with a map of the city juggled four walkie-talkies and three iPhones, jotting down coordinates received from the field in Arabic and relaying them in English to someone with a British accent.
A tour of the neighborhood gave a glimpse of how the jihadists fought. Tunnels passed under streets, and paths between houses were obscured by tarps or slats of wood to hide fighters' movements from surveillance drones.
The Iraqi force's commander, Lt. Gen. Abdul-Ghani al-Asadi, said in an interview that the Islamic State depended heavily on explosives planted on roads and in buildings for defense and on suicide bombers for attacks. A few hundred jihadists had been killed, he said, mostly in airstrikes. Very few had been taken prisoner. "They don't surrender," General Asadi said. "They blow themselves up."
Iraqi and coalition officials placed blame for the city's destruction on the jihadists, who mined roads and buildings and detonated the homes of anyone connected to the Iraqi government. This week, they detonated explosives on the ground floor of the Ramadi General Hospital, the largest in the province, damaging the building as security forces approached, General Asadi said.
Col. Steven H. Warren, a Pentagon spokesman in Iraq, said, "One hundred percent of this is on ISIL because no one would be dropping any bombs if ISIL hadn't gone in there." But the heavy dependence on air power also clearly played a role. The coalition has launched more than 630 airstrikes in the area since July, and General Asadi said his counterterrorism force advanced only after the coalition had cleared the way.
Local officials worry that the money needed to rebuild the city will not materialize, given the magnitude of the need and disastrous effects of low oil prices on Iraq's budget. The United States and its allies have pledged $50 million to a United Nations fund for reconstruction in Iraq, but Sabah Karhout, the head of the Anbar provincial council, estimated that rebuilding the city would require $12 billion.
"Ramadi is a city of ghosts," he said. "If there are not serious international efforts, it will not be rebuilt." Those efforts will be central to whether the city's former residents can return. Many Ramadi residents have sought refuge in a growing tent camp east of the city. Khalida Ali, 56, and her family of nine had remained in the city when the jihadists took over in May.
While she avoided leaving home, masked fighters in Afghan clothing once harassed her at the market for not wearing a black gown and covering her face. Later, the jihadists arrested her husband's brother, a police officer, and beheaded him in the street, she said, speaking from the tent where she now lives.
The jihadists prevented civilians from leaving in an effort to deter airstrikes, she said, but after Iraqi forces entered the city, her family joined a group making a dash for the front lines. On the way, someone tripped a booby trap, killing her son's wife and their infant son.
Ms. Ali was unsure whether her home had been damaged since she left, but she vowed to return. "It is where we were born," she said. "We can't leave Ramadi."
By Ben Hubbard