BAGHUZ, Syria — From gun trenches in the hills overlooking the Syrian town of Baghuz, US-backed Kurdish and Arab fighters known as the Syrian Democratic Forces or SDF rain down automatic weapons fire on what’s left of the Islamic State caliphate.

ISIS has been pushed back — mile-by-mile, through fierce fighting — from nearly all the territory it used to control in Syria into a tiny patch of land on the Euphrates river near the border with Iraq.

SDF commanders like Adnan Afrin say the full territorial victory they’ve spent years fighting for is finally now in sight. “This sprawling organization that stunned the world has crumbled and is close to being defeated. It's been painful, and difficult — from the day ISIS started to this moment," Afrin said. ”But it's ending now.”

The SDF advance has been slowed by the number of women and children that have streamed out of ISIS-controlled areas since the bombardment started. More than 60,000 people have left during the course of the siege.

On Wednesday, SDF officials said they were in control of most of the encampment with just a small group of ISIS fighters left inside, surrounded and outnumbered. But from rooftops on the outskirts of Baghuz, SDF snipers continue to take out targets, while 50-caliber machine guns rain down fire from above and U.S. jets patrol the skies overhead.

The battle is almost over, but for now ISIS fighters are still clinging to their last tiny piece of territory.

This segment originally aired March 20, 2019, on VICE News Tonight on HBO.

This article originally appeared on VICE News US.