ISTANBUL (Reuters) - Doctor Khalil Agha was working at a hospital in northwest Syria when masked gunmen knocked at his door, waved a piece of paper saying he was wanted by a powerful Islamist group, and bundled him into their car, bound and blindfold.

The surgeon, whose captors demanded $100,000 for his freedom, was one of 10 medical personnel who doctors say have been seized this year in a rebel-held region sinking into anarchy.

A deal between Russia and Turkey three months ago averted a Syrian army offensive to recapture the region, centered around Idlib province. But cuts in foreign funding - both to militant groups and local police struggling to assert some order - have undermined security.

Now medical workers are feeling the impact as armed gangs compete for influence and money. Doctors are targeted because they are well-known, comparatively well-paid and inclined to express views that put them at odds with their kidnappers.

For the first five years of the civil war, until the end of 2016, there were almost no attacks on medics, said Munther Khalil, head of the Idlib Health Directorate. “But in the last two years, there have been explosive devices that target our cars, car thefts, detentions and assassination attempts.”

Four months ago Agha was working a shift at his hospital in eastern Lattakia province, near Idlib, when he heard a knock. He opened the door to find two armed men who told him he was wanted by a court run by the Islamist group Hayat Tahrir al-Sham, which controls much of the region.

They tied his hands and covered his eyes. “It wasn’t until they released me seven days later that I saw daylight,” he said.

His kidnappers accused him of working with Turkey, foreign NGOs and another Syrian opposition group and demanded $100,000 from his wife. She sold her jewelry and his car, and borrowed money from as many people as she could to pay the ransom.

NORTHWEST UNREST

The arrival of tens of thousands of fighters and civilians from defeated rebel enclaves elsewhere in Syria has made a bad situation worse in the northwest, the last major bastion of opposition to President Bashar al-Assad.

“The number of factions increased, and the fighting between factions increased as some groups took control and others went extinct,” Agha said.

“Everyone started working alone, according to their own agenda - religious or political - leaving no one in complete control,” he said.

The area is held by an array of rebels, the most powerful being Tahrir al-Sham, an amalgamation of Islamist groups dominated by the former Nusra Front - an al Qaeda offshoot until it distanced itself from the group in 2016.

Other groups fight under the rebel Free Syrian Army banner with Turkish backing, in an alliance called the “National Front for Liberation”.

Foreign payments to several factions were halted following a U.S. decision to halt its funding program last year, cutting off groups that depended almost wholly on donations from outside and driving some to kidnapping to make ends meet.

Earlier this year, a cut in British support ended funding for projects including an independent police force.

The Free Syrian Police, which operates only in rebel-held areas outside the control of Tahrir al-Sham, was unarmed in accordance with a deal with Western backers - the United States, Britain, Denmark, Netherlands, Canada and Germany.

Since the funding ended, some policemen have taken up arms. But they cannot defend civilians and doctors against kidnappings by armed groups in areas out of their control.

“We don’t have a magic wand,” said Colonel Maher Ghrebeh.

The funding cut also forced policemen to find other jobs to make ends meet, undermining their security work, said General Fouad al-Sweid, head of the Idlib Free Police. “Policemen are being forced to leave work and go work in their olive groves, harvest potatoes, work as laborers or bakers.”

“NEITHER WAR NOR PEACE”

Over the summer, doctors in Idlib went on a three-day strike to protest against the kidnappings and rampant insecurity. Some doctors started carrying small arms for protection, though others said that would not protect them.

“What good would a light weapon be in the face of an armed group?” said one pharmacist who was recently abducted.

The pharmacist, who asked not to be named, was doing his rounds in a village in Idlib when he was stopped by masked men. Armed and riding a pickup truck with a mounted rifle, the seven men forced him to abandon his car, blindfolded him and took away his phone.

They then drove him to an unidentified location and put him in a dark, guarded room, where he was held for five days and tortured. They sent recordings of the torture to his wife and demanded $150,000 in exchange for his release.

The pharmacist’s wife sold all her jewelry and borrowed money until she had $18,000, negotiating the armed group down to that amount and won his release.

Agha didn’t go back to his hospital for three months after being freed, and he now has a list of 29 people he owes money.

He says he’s still afraid, but despite friends warning him against returning, he’s back doing surgery at the hospital.

In the relative lull which followed September’s truce, Agha says they almost miss the bombs.

“We wish for bombardment and clashes, because people get distracted,” he said with a weak laugh. “The situation we’re in, neither war nor peace, is a disaster.”