BEIRUT — U.S.-backed Syrian forces were removing land mines and clearing roads in the northern city of Raqqa on Wednesday, a day after commanders said they had driven the Islamic State from its de facto capital.

Mustafa Bali, spokesman for the Kurdish-led Syrian Democratic Forces, said preparations were underway for a formal declaration of the city’s liberation.

The SDF said Tuesday that military operations in Raqqa have ended and that their troops have taken full control of the city.

The U.S.-led coalition cautioned that the clearing operations would continue, saying some 100 militants may still be hiding in the city.

On Wednesday, the spokesman for the coalition, Col. Ryan Dillon, tweeted that 95 percent of the city is under full control as clearing operations continue.

The coalition stressed that the SDF has been successful in holding onto captured territory because of its clearing procedures, which prevent counterattacks.

Brett McGurk, the top U.S. envoy for the coalition, said he was in northern Syria to prepare for the defeat of the militants. He said the United States will help in clearing explosives as well as restoring services in the city.

McGurk posted a photograph Wednesday of surrendering militants, saying: “Once purported as fierce, now pathetic and a lost cause.”

He said the Islamic State, also called ISIS, lost nearly 6,000 militants in Raqqa before surrendering in large numbers.

Aid and charity organizations have warned of the high cost borne by civilians.

In the neighboring Deir el-Zour province, where the SDF and Russian-backed Syrian troops are waging separate offensives against the militants, nearly 500,000 civilians remain trapped by the fighting, the International Rescue Committee said late Tuesday.

The U.N. refugee agency said that in the last few days, around 40,000 Raqqa residents arrived in already overcrowded displacement camps in the province, warning of the danger of land mines and unexploded ordnance.

The fall of Raqqa marks a major defeat for the extremist group, which has seen its self-styled Islamic caliphate steadily shrink since summer.

The group still holds territory to the south of Raqqa and in Deir el-Zour, as well as smaller pockets elsewhere in Syria and Iraq.

On Wednesday, clashes were reported between the SDF and ISIS militants in the group’s last strip of land in Hassakeh province, to the east of Raqqa. The Syrian Observatory for Human Rights also reported clashes between forces allied with the Syrian government and ISIS militants.

Manwhile, a media outlet affiliated with the Syrian military said a senior commander who led the fight against ISIS in Deir el-Zour was killed Wednesday.

The Central Military Media described Brig. Gen. Issam Zahreddine, 56, as one of the most important field commanders in the Syrian army.

The Lebanese Al-Manar TV, which is close to the Syrian government, said a land mine killed him.