After four years of war, Ahmed thought he had finally been given a break when he landed a job at Syria’s national gas company. Then he was assigned his new supervisors: the militant group, Isis.

For $80 a month, the 25-year-old petroleum engineering graduate from Deir Ezzor spent a nightmarish year working at the Tuweinan gas plant — one of several that have in effect become joint ventures between President Bashar al-Assad’s government and the world’s most notorious jihadi group.

The plant is not far from a military base where Isis months earlier had killed dozens of soldiers and displayed their heads on spikes. “It was frightening, but I didn’t have a choice,” says Ahmed in a phone interview. Like all employees interviewed, he asked to change his name for his family’s safety. “For people like me, you basically have no other work opportunities in Syria.”

Isis and the Assad regime remain battleground enemies, but on Syria’s gasfields the need for electricity has forced them into a Faustian bargain.

Gas supplies 90 per cent of Syria’s power grid, on which Isis and the Assad regime depend. Isis controls at least eight power plants in Syria, including three hydroelectric facilities and the country’s largest gas plant. The regime has companies that know how to run them.

Syrian activists and western officials have long accused the regime of making secret oil deals with Isis, which controls nearly all of Syria’s petroleum-producing east. But an FT investigation shows co-operation is strongest over the gas that generates Syria’s electricity. Interviews with over a dozen Syrian energy employees have revealed agreements that are less about cash than about services — something they may find more valuable than money.

The business deals do not translate into a truce. The two sides continually attack one another’s employees and infrastructure. The regime points to these clashes as proof that such understandings do not exist. In a written statement, Syria’s Ministry of Oil and Natural Resources said: “There is no co-ordination with the terrorist groups regarding this matter.” But it acknowledged some of its employees work under Isis “for the sake of preserving the security and safety of these facilities”.

But others describe the fighting as part of a struggle for better terms, where neither seeks to destroy the other. “Think of it as tactical manoeuvres to improve leverage,” said the owner of one Syrian energy company, who met the FT but asked not to be named. “This is 1920s Chicago mafia-style negotiation. You kill and fight to influence the deal, but the deal doesn’t end.”

Deadly game

The pawns in this deadly game are employees of state-run energy companies and the private groups they contract.

Instead of worrying over valves and pipelines, Ahmed spent much of his time at Tuweinan parsing a high-stakes mind game with his militant overseers. They beat workers regularly, and even killed one in front of his colleagues.

“The worst part is knowing that once you’re there, you belong to no one,” he said. “To both the regime and to Isis, you become untrustworthy.”

Like Ahmed, most workers sent to Isis territory are from Syria’s Sunni Muslim majority, who drove the revolt that spawned Syria’s brutal civil war against the Assad family and elites from their minority Alawite sect that have dominated the state. Many members of Syria’s minorities have supported Mr Assad — especially since Isis overtook the rebellion and branded non-Sunnis infidels.

Marwan, another Sunni engineering graduate who worked for the Syrian Gas Company before fleeing the country this summer, says only minorities and Sunnis with good political connections can secure jobs in government-controlled areas. Less fortunate employees find little sympathy from the state company if they try to avoid a posting in an Isis-controlled plant.

“If you try and complain, they say, ‘Forget about it. Trust me, it’s better in the Isis areas, people are happier there’,” Marwan, a bespectacled 25-year-old, told the FT.

Workers say that in agreements between Isis and the regime, the Syrian state and private gas companies pay and feed their employees and supply equipment to the facilities. The two sides divide the electricity produced from the methane heavy “dry gas”, while Isis gets the fuel products made from the plants’ liquid gas.

For example, employees at Tuweinan say its gas is sent to the Isis-held Aleppo thermal power plant. When facilities are working — there are frequent outages due to the instability in the area — the Tuweinan deal nets the regime 50mw of electricity each day. Isis takes 70mw.

At most plants where the two sides co-operate, Isis gives its daily output of liquid petroleum or cooking gas, and condensate — used for generators — to its own members or sells it to locals. At Tuweinan, unstable conditions mean it currently produces about 300 barrels of condensate but no cooking gas.

Tuweinan is partly run by the Syrian company Hesco, whose owner, George Haswani, is under EU sanctions on suspicion of dealing with the regime and Isis. Several workers said Hesco sends Isis 15m Syrian lira (about $50,000) every month to protect its equipment, which is worth several million dollars.

Michel Haswani, the owners’ son and a manager at Hesco, denies this. He said that claims the company pays Isis or communicates with it in any way are “not true and imprecise”. But he says that Isis was “partly” running the plant.

Isis enforcement

Isis installs “emirs” who monitor operations and negotiate with the regime through mediators. There is an emir for the plant, a religious emir and another from the Hisba, the group’s morality police. Workers say the Hisba emir at Tuweinan, known as Sheikh Haseeb, patrolled the plant to enforce strict Islamic practice. Anyone breaking the rules would receive 75 lashes.

Sheikh Haseeb also allowed gunmen to threaten employees. They particularly targeted the plant’s two dozen Christians, even though workers say Hesco had already paid Isis a poll tax for them in gold. “One guy pointed his knife at an engineer saying, ‘By God we will slaughter you like a sheep,’” one Hesco employee recalled in an interview via WhatsApp. “I never saw him or any of the other Christian employees again.”

The director of operations at Tuweinan, Taha al-Ali, was known as the Syrian Gas Company’s mediator with Isis. A pious man, he was popular with his colleagues, but workers say Isis members suspected him of being a regime collaborator.

When the emir discovered that gas was being diverted to Arak, a plant then held by the regime but now under Isis control, he accused Mr Ali of stealing for the Assad government. He was dragged away by guards. Workers say he returned disheveled three months later, on the day they were forced to witness his execution.

“He was accused of mocking Islam and being a loyalist of the regime,” said one colleague who recounted the event in a telephone interview. “The gunmen shot him in the head, one bullet each. Then Sheikh Haseeb came up and shot him in the stomach. It was terrifying.”

Workers say Tuweinan has continued to function despite the violence. But slowly the number of workers has dropped from 1,500 to about 300 as many have fled.

Many regime supporters insist these dealings are necessary to preserve infrastructure and keep the lights on, and some agreements are extensions of pre-existing deals made with rebel groups that controlled the areas before Isis took over last summer. “There’s no conspiracy, but as the regime guys say, it’s necessary complicity,” said the Syrian energy company owner.

Another oil company official who works with the Syrian regime, says juggling these deals has become a preoccupation for the oil ministry.

“Before it was [rebel groups] Jabhat al-Nusra or the Islamic Front. Nowadays it’s representatives for Isis,” he told the FT in Beirut.

Not all Isis-controlled plants are as miserable as Tuweinan. Employees say treatment is better at the “Conoco” plant in eastern Deir Ezzor. Syria’s biggest gas producer, the plant was named for the US company that first developed it. Employees say its emir, Abu Abdulrahman al-Jazrawi, is a Saudi Arabian with years of experience who holds training sessions and gives workers a barrel of condensate each month in addition to the state salary. A barrel can sell for about $100 — often more than their wages.

Many workers also say that even finding work at regime-controlled facilities is no guarantee of safety, because they are targeted by the jihadis. Marwan worked at the Ebla plant in government-controlled Faruqlus, near Homs, where Isis blew up pipelines and set off a car bomb that killed his manager in April.

“Every day, we went over evacuation plans,” he said. “I’m Sunni — if I fled too quickly, the Alawites would accuse me of being a conspirator. If I waited too long, Isis could catch me.”

The nearby Shaer gasfield, which produces nearly half Syria’s electricity, was taken over by Isis twice in 2014 before the regime recaptured it. Everyone working there disappeared and is presumed dead, according to Marwan and other employees.

When nearby Palmyra fell to Isis this summer, Marwan says many of his friends working at Hayyan, near Shaer, wanted to flee. “The army wouldn’t let them. They said who ever tried to run will be shot dead.”

Back at Tuweinan, Ahmed found events like Mr Ali’s killing too much to bear. “He was one of the few people I’ve met in life I would say was an amazing human being,” he said. A few months later, he and some other workers smuggled themselves across the border to Turkey, crossed the Mediterranean, and trekked to Germany. All say they are now considered fugitives for abandoning state posts.

Officials at the plant have been unable to find someone willing to replace Mr Ali. But the deal goes on.