(Warning: This story contains graphic photos.)

A coalition of fighters in Syria fought off an assault by the Islamic State (IS) Thursday, then celebrated by displaying the heads of IS militants, according to opposition supporters.

It all took place in and around the town of Azaz, near the Turkish border, after IS reportedly planned a suicide truck bombing on rebel positions as a prelude to a larger assault. The rebels say they were tipped off and were lying in wait when IS attacked.

"Last night, [IS] sent a suicide truck to Sawran, which is the frontline now next to Azaz, but we had info of the operation," one man who works for opposition forces in Azaz told VICE News. "So they targeted the truck with a missile…. Then the fighters following the truck were caught."

At least some of those fighters were subsequently beheaded.

"It is not the way we act," the man said, "but it's sort of revenge for all the civilians and leaders they killed."

Videos posted to Facebook Friday morning appear to show rebels — some of whom are Islamists themselves — brandishing the heads of the dead men in front of a jubilant crowd as people fire guns into the air. Displaying the heads in central Azaz has symbolic meaning; during several months of IS — then known as ISIS — rule in 2013, the group would execute people on Fridays and display their heads at the same location, according to locals.

In January 2014, a coalition of mostly Islamist fighters drove out IS from much of Aleppo province and the corridors leading to Aleppo city. Since then, Azaz and most of opposition-controlled Aleppo have been a stronghold for anti-IS rebels. The Islamic State has made reclaiming this lost territory a key goal and launched a series of suicide attacks against Azaz in an apparent attempt to recapture it. A video posted last week to an IS-affiliated Youtube account appears to show fighters preparing an assault to retake the city.

Azaz is a main artery for equipment and supplies traveling between Turkey and Syrian rebels, as well as the start of an important humanitarian supply line between Turkey and Aleppo. The recapture of Azaz by IS would effectively cut off a substantial number of rebels opposed to the group.