Updated on December 28 at 12:11 p.m. ET

Iraqi government troops, backed by some Sunni tribesman and U.S. airstrikes, have retaken the strategically vital city of Ramadi from the Islamic State group.

“The security forces have entered the governmental buildings and raised the Iraqi flags over them after killing many ISIS militants, and the rest have escaped,” Brigadier-General Yahya Rasool, an Iraqi military spokesman, said.

Colonel Steve Warren, a spokesman for the U.S. military operation against the Islamic State, tweeted an image of the Iraqi flag being raised over the government complex in Ramadi:

Iraqi troops had encircled the city last month, but progress was slow. Militants had booby-trapped bridges leading to Ramadi and had positioned snipers in key areas. The operation to retake the city began last week with about 10,000 Iraqi troops, Sunni tribal fighters, and U.S. airstrikes launching an offensive against ISIS, another name for the Islamic State group. By Monday afternoon, as Rasool put it, Ramadi was “fully liberated” after ISIS fighters fled the government headquarters.

Still, pockets of resistance remain in the capital of Al-Anbar province, a Sunni stronghold in Shiite-majority Iraq. ISIS, which captured the city in May, is mostly Sunni and Ramadi was its most important prize in 2015. The group controls large portions of territory across the Iraq-Syria border and still holds major cities and provinces in both countries.   

ISIS controls the Iraqi cities of Mosul and Fallujah, as well as Raqqa, the Syrian city that serves as its capital. The retaking of Ramadi would allow the Iraqi government to cut off supplies to Fallujah, which sits about halfway between Ramadi and Baghdad, the Iraqi capital. It would also, in the words of The New York Times, provide a boost to Haider al-Abadi, the Iraqi prime minister, who  “has tried to reach out to the country’s large Sunni minority.”

The victory in Ramadi represents another setback for ISIS this year. Last month, Iraqi Kurdish fighters recaptured Sinjar from the group. ISIS is being targeted by the U.S. and its allies in Iraq as well as in Syria, where Russia is also conducting airstrikes against the group.

Despite its apparent ability to carry out large-scale attacks in cities such as Paris and Tunis, ISIS has slowly lost territory this year. Indeed, over the weekend, ISIS’s media arm released a recording of what it said was the voice of Abu Bakr al-Baghdadi, the group’s little-seen or heard from leader, urging his fighters to “be patient.” He was last heard in a similar recording in May.