ISIS may be on the verge of total defeat in Syria, but locals in northern opposition-held areas fear a resurgence – claiming they have not received enough support to keep the terrorists behind bars.

“We don’t want to release them to the community because they are dangerous,” Muhammad Abbas, Head of Public Prosecution at the Magistrate Court in Sawran Azaz, a small rebel-held town just north of Aleppo city, told Fox News. “But the situation is not stable. We need to find a better solution to deal with these huge numbers.”

Abbas could not specify how many ISIS fighters have been captured in the area, but estimated “hundreds,” with more attempting to find safe haven in the remaining anti-Assad pocket every day. Scores more are coming in having escaped now rebel-controlled Manbij and into the Free Syrian Army (FSA) terrain of Jarablus, just 20 miles north.

Abbas said the process is such that after an ISIS suspect is nabbed, local courts then determine their level of involvement within the ranks of the organization. Those alleged to have been hardened fighters are tried at the nearby Criminal Court of Azaz. If found guilty, and depending on the severity of their crimes, they could be sentenced to around five years in jail.

But those joined ISIS in non-combat roles – sometimes forced against their will to work in places like hospitals or bakeries – are dealt with by local FSA courts like Sawran. These are generally considered to “not be effected ideologically” by the group’s hardline Islamist doctrine are slapped with six months behind bars.

But locals are concerned that many are still ISIS-indoctrinated, requiring more than just a limited jail term. And in desperation, they are taking matters into their own hands.

Last October, as the “caliphate” capital of Raqqa was crumbling and jihadists fled, media activist Hussein Nasser established the “Syrian Center for Anti-Extremist Ideology,” an experimental rehab facility in the nearby town of Marea.

“Lots of former ISIS fighters – more than 3,000 – started coming to our territory and we needed to take action,” Nassar told Fox News. “These were big numbers – and there were women and children too.”

Yet accommodation is proving to be a problem.

“We don’t have space for all, and only a small number of volunteer staff,” Nassar said. “This is not enough.”

One hundred fighters are currently being held at the adhoc facility, but only 25 are able to participate in the “de-radicalization” program at any one time. The program includes daily Islamic lectures meant to soften their dogmatic views, along with individual and group psychology sessions and “entertainment” activities like chess.

So far, five men have graduated from the six-month curriculum and released back onto the streets, under the watchful eye of authorities.

Given the financial and spatial limitations of the experimental rehab, the vast majority of captured or surrendered ISIS members are instead sifted through the Syrian opposition-run court system and then imprisoned. Data provided to Fox News indicated most of these were males aged between 15 and 30. Around 10 percent are women, mostly wives of ISIS fighters.

But lack of space means light sentencing.

“Courts are being forced to reduce ISIS sentences because of the lack of space,” Nassar lamented. “Two to four years for fighters, and non-fighters less than one year, and now it is being reduced even from that. We need help from the international community, otherwise this terrorism could come again and spread to other countries.”

UNDER THREAT AND HOMELESS, DISPLACED IRAQIS RETURN TO THE CAMPS

FROM JAIL, REMORSEFUL EX-ISIS FIGHTER WARNS: GROUP WILL RETOOL AND RETURN

Abbas concurred they are fast running out of room in their largely decimated region.

“Sadly, we don’t have enough space. The Assad regime’s bombing campaign destroyed lots of our prisons,” he noted. “We need support to rebuild the destruction and make new buildings to use as prisons.”

The remaining rebel-run prisons and courts, along with the new de-radicalization center, are being operated with little means and money, other than some support from the Turkish government, Abbas claimed.

He insisted there are enough FSA forces surrounding their security facilities to avoid an ISIS jail break. But their constant concern is the chaos that could ensue if the area is again targeted by Assad regime and Russian warplanes.

“In the past these planes used to target prisons and courts especially,” Abbas explained.

Colin Clarke, a terrorism expert at the RAND Corporation, also expressed concern the current situation could spell a ticking time-bomb for an ISIS revitalization.

“The FSA has detained scores of ISIS fighters, both local Syrians and many foreigners as well. They are currently talking to the Turks about what should be done with these people,” Clark said. “And in terms of capacity, we’re essentially talking about non-state actors – FSA, opposition rebels – attempting to perform state judicial functions of investigation and prosecution.”

In his view, the scenario is “laughable.”

The International Committee of the Red Cross (ICRC) told Fox News they are trying to expand their presence in Syria. But at the current stage of the conflict, they are not able to visit and assist all detention facilities in the ravaged country.

And while the Syrian opposition told Fox News that they do not impose capital punishment in the pockets of control, the powers-to-be in neighboring Iraq are opting for a far less lenient approach.

The Baghdad government is believed to be holding thousands of ISIS men and women behind bars, has sentenced more than 300 locals and foreigners to death on terrorism charges – and wasted no time in already sending dozens to the gallows.