In the cramped living room of a run-down flat near the Aleppo frontline, two Syrian rebels sat opposite each other. The one on the left was stout, broad-shouldered, with a neat beard that looked as though it had been outlined in sharp pencil around his throat and cheeks. His shirt and trousers were immaculately pressed and he wore brand-new military webbing – the expensive Turkish kind, not the Syrian knock-off. The rebel sitting opposite him was younger, gaunt and tired-looking. His hands were filthy and his trousers caked in mud and diesel.

The flat had once belonged to an old lady. Traces of a domestic life that had long ceased to exist were scattered around the room and mingled with the possessions of the new occupiers. A mother of pearl ashtray sat next to a pile of walkie-talkies. Small china figurines stood on top of the TV next to a box of cartridges. Guns and ammunition lay on the rickety wooden chairs and a calendar showing faded landscapes hung on the wall. In the bedroom next door clothes were piled on the bed next to crates of ammunition. The stout rebel was shifty, on edge and keen to finish what he came to say and leave quickly. The other looked like a man waiting for a disaster to unfold.

But like a couple trying to conduct the business of their divorce with civility they spent a long time on pleasantries: each asked the other about his village and praised the courage and strength of his people. Outside a machine gun fired relentlessly down the street, interrupted only by the occasional thud of a mortar shell.

‘I am taking my cousins away from the front,’ the stout man finally said.

‘Why?’ the young rebel whined, as if one of the mortar shells had smacked him in the head. ‘Did we do anything wrong? Didn’t we feed them properly? Didn’t they get their daily rations? Whatever ammunition we get we divide equally: tell me what we did wrong.’

‘No, no, nothing wrong – but you seem not to have any work here.’

‘But this is an important defensive position,’ the young rebel pleaded. ‘All of Aleppo depends on this hill. If you go, two frontline posts will be left empty. They’ll be able to skirt around us.’

‘I’m sure you’ll take care of it. Allah bless your men, they’re very good.’

‘Where will you go?’

‘A very good man, a seeker of good deeds – he is from our town but he lives in the Gulf – told me he would fund my new battalion. He says he will pay for our ammunition and we get to keep all the spoils of the fighting. We just have to supply him with videos.’

‘But why would he do that? What’s he getting in return?’

‘He wants to appease God, and he wants us to give him videos of all our operations. That’s all – just YouTube videos.’

‘So he can get more money.’

‘Well, that’s up to him.’

They spent some more time on pleasantries but the divorce was done. The stout man walked out. Waiting for him in the cold were half a dozen men, young, earnest, country boys with four guns between them. Their cigarettes glowed in the dark as they walked behind their cousin, their new commander, in his pressed trousers and shirt, who promised them better food, plentiful ammunition and victory. So a new battalion is formed, one more among the many hundreds of other battalions fighting a war of insurgency and revolution against the regime of Bashar al-Assad.

We in the Middle East have always had a strong appetite for factionalism. Some attribute it to individualism, others blame the nature of our political development or our tribalism. Some even blame the weather. We call it tasharthum and we loathe it: we hold it as the main reason for all our losses and defeats, from al-Andalus to Palestine. Yet we love it and bask in it and excel at it, and if there is one thing we appreciate it is a faction that splinters into smaller factions. Yet even by the measure of previous civil wars in the Middle East, the Syrians seem to have reached new heights. After all, the Palestinians in their heyday had only a dozen or so factions, and the Lebanese, God bless them, pretending it was ideology that divided them, never exceeded thirty different factions.

In Istanbul I asked a Syrian journalist and activist why there were so many battalions. He laughed and said, ‘Because we are Syrians,’ and went on to tell me a story I have heard many times before. ‘When the Syrian president, head of the military junta at the time, signed the unification agreement with Nasser, basically handing the country to the Egyptians and stripping himself of his presidential title, he passed the document to Nasser and said I give up my role as president but I hand you a country of four million presidents.’

For decades, the dictatorship in Syria worked to stamp the people into submission: every pulpit, every media outlet, every schoolbook sent out the same message, that people should be subservient to the ruler. In Syria (as in a different way in Iraq, Egypt and the rest), those in authority – from the president to the policeman, from the top party apparatchik to the lowliest government functionary – exercised power over every aspect of people’s lives. You spent your life trying to avoid being humiliated – let alone detained and tortured or disappeared – by those in authority while somehow also sucking up to them, bribing them, begging them to give you what you needed: a telephone line, a passport, a university place for your son. So when these systems of control collapsed, something exploded inside people, a sense of individualism long suppressed. Why would I succumb to your authority as a commander when I can be my own commander and fight my own insurgency? Many of the battalions dotted across the Syrian countryside consist only of a man with a connection to a financier, along with a few of his cousins and clansmen. They become itinerant fighting groups, moving from one battle to another, desperate for more funds and a fight and all the spoils that follow.

Officially – or at least this is what many would like to believe – all the battalions are part of the Free Syrian Army. But from the start of the uprising in March 2011, the FSA has never managed to become an organisation with the kind of centralised command structure that would allow it to co-ordinate attacks and move units on the ground. Until recently, Colonel Riad al-Asad, the nominal head of the FSA, and his fellow defectors from the Syrian army were interned in the Officers’ Camp, a special refugee camp in southern Turkey – for their protection, the Turks say. All meetings and interviews with the defecting colonel had to go through Turkish intelligence. Towards the end of last year the FSA announced that it had moved its headquarters to the Syrian side of the border, in an attempt to prove its relevance. But battalions are still formed by commanders working and fighting on their own initiative across Syria, arming themselves via many different channels and facing challenges unique to their towns and villages. For these people the colonel was just a talking head and a stooge of the Turks, and the FSA not much more than a label. Another problem emerged when higher-ranking officers started defecting from the army. Who leads the FSA? The officers who defected first? Or the men who outrank them? Parallel organisations of defecting officers started to pop up, but few had any real influence where it mattered.

So how do you form a battalion in Syria? First, you need men, most likely young men from the countryside, where the surplus of the underemployed over the centuries has provided for any number of different armies and insurgencies. Weapons will come from smugglers, preferably via Iraq or Turkey. You will also need someone who knows how to operate a laptop and/or a camcorder and can post videos on the internet – essential in applying for funds from the diaspora or Gulf financiers. A little bit of ideology won’t hurt, probably with a hint of Islamism of some variety. You’ll also need money, but three or four thousand dollars should be enough to start you off.

Long before the uprising, Abu Abdullah and his brothers made a fortune running an import/export and cross-border transport business. Their trucks crossed the frontiers of Turkey, Syria, Lebanon, Jordan, Iraq, all the way to Saudi Arabia, ferrying Turkish vegetables to Iraq and bringing back fuel, taking Syrian fruit across Jordan to the Saudi border. Not all the products they traded in were perishables nor were all legal; subsidised Syrian petrol was smuggled to Lebanon and Turkey.

The brothers, like many other members of the rich business elite, were conservative Muslims, though not radical or Salafist. Thanks to their wealth and religion, they had connections across the mercantile Middle East, the illicit smuggling networks of the region and, more important, links to powerful preachers and religious families in the Gulf. When, very early on, their native town of Homs erupted in an uprising that soon became an armed insurrection it was wealthy – and, usually, religious – Syrians like Abu Abdullah who sent money, ran services, provided food and fuel. They are still central to humanitarian provision in Syria.

Abu Abdullah also used his extensive cross-border network to bring in weapons and ammunition. ‘I had five pick-up trucks filled with weapons and ammunition crossing from Lebanon and ten crossing from Iraq every week. We started with hunting rifles and now we bring anti-aircraft guns. We were the ones who powered the revolution.’

He is tall, well-built and has the confidence of a wealthy man surrounded by poor peasants. He conducts the business of funding and arming the uprising from a small concrete room perched deep inside a pine and olive grove that cascades down the slopes of a mountain in Idlib province. Delegates from across the country would come to sit on the floor beside him. Some asked for weapons, others brought money. Hundreds of thousands of dollars passed through the room. At night he lay on a thin mat on the bare concrete floor. Switching from vegetables to armaments turned out to be very easy, he said. But as the fighting spread and intensified more money and more organisation was needed to push the battle towards a tipping point. A master plan was devised to co-ordinate the flow of weapons.

‘We reached a point in the fighting, in spring 2012, when we needed proper support. We needed heavy machine guns, real weapons. Money was never an issue: how much do you want? Fifty million dollars, a hundred million dollars – not a problem. But heavy weapons were becoming hard to find: the Turks – and without them this revolution wouldn’t have started – wanted the Americans to give them the green light before they would allow us to ship the weapons. We had to persuade Saad al-Hariri, Rafic Hariri’s son and a former prime minister, to go to put pressure on the Saudis, to tell them: “You abandoned the Sunnis of Iraq and you lost a country to Iran. If you do the same thing again you won’t only lose Syria, but Lebanon with it.”’ The idea was that the Saudis in turn would pressure the Americans to give the Turks the green light to allow proper weapons into the country.

Now suddenly, while on the ground the revolution was still in the hands of small bands of rebels and activists, a set of outside interests started conspiring to direct events in ways amenable to them. There were the Saudis, who never liked Bashar but were wary of more chaos in the Middle East. The Qataris, who were positioning themselves at the forefront of the revolutions of the Arab Spring, using their formidable TV networks to mobilise support and their vast wealth to fund illicit weapons shipments to the Libyans. And of course there were the French and the Americans.

‘The Americans gave their blessing,’ Abu Abdullah said, ‘and all the players converged and formed an operations room. It had the Qataris, the Saudis, the Turks and Hariri.’ In their infinite wisdom the players decided to entrust the running of the room – known as the Armament Room or the Istanbul Room after the city where it was based – to a Lebanese politician called Okab Sakr, a member of Hariri’s party who was widely seen as divisive and autocratic. The plan was to form military councils to be led and dominated by defectors from the Syrian army – this in order to appease the Americans, who were getting worried about the rising influence of the Islamists. All the fighting groups, it was assumed, would eventually agree to answer to the military councils because they were the main source of weapons.

At first, the plan seemed to be working. As summer approached military councils sprang up in Aleppo, Homs, Idlib and Deir al-Zour and some major battalions and factions did join in. Better weapons – though not the sophisticated anti-tank and anti-aircraft equipment the rebels wanted – started entering Syria from Turkey. Until this point, most of the weapons smuggled from Turkey had come in small shipments on horseback or carried on foot by intermediaries and the fighters themselves, but these new shipments were massive, sent by truck. Iraq remained the largest single supplier, a legacy of three decades of war, but a lot of the Iraqi ammunition was of bad quality, having been buried in the sand for years. So the new supplies were eagerly received.

In the city of Deir al-Zour, in the early summer I sat with the chief armaments officer of the military council, who had converted his bedroom into an arsenal. I watched as he unzipped travel bags and distributed RPGs to his fighters, the rockets brand-new in their plastic wrapping, along with Austrian rifles (surplus or refurbished), Swiss hand grenades, Australian sniper rifles – the list went on.

A few weeks later, though, the plan started to collapse. In Deir al-Zour, an army defector accused the military council of being dominated by a single tribe and village. He set up a rival council. In Idlib and Homs the council was seen as too weak as rival battalions grew in influence. The Istanbul Room was accused of favouritism. By mid-July it was only in Aleppo that the council seemed to be working and the rebels pushed towards the city.

After two weeks of fighting the rebels were in control of large parts of Aleppo, but they soon suffered a serious setback in the Salah al-Din district. The weapons shipments stopped getting through in September. When I went there skirmishes were still taking place on dozens of frontlines criss-crossing the city and shelling and air strikes pounded the concrete residential blocks mercilessly. The air was sultry and oppressive, with an occasional breeze carrying the smell of death and festering garbage and rustling the curtains in broken windows.

Just before dusk a plane that had been circling overhead for hours, driven away only briefly after rebels wasted precious ammunition on it, returned with new determination. With each circle the rebels ran for delusional cover: a bush, a tree, a house – nothing that would stop a bomb, but at least it gave a feeling of protection. The plane circled, swooped down, released a black object and rose up again in a graceful curve like a dancer. The object, a bomb, disappeared behind a building. First there was a cloud – brown, black and grey – and then a thunderous explosion. The plane passed overhead and banked away.

Two officers, members of the Aleppo military council, were policing the frontlines. Captain Hussam – codename Abu Muhammad – was round and tall and always laughing. He drove an old car loaded with ammunition, co-ordinating attacks and supplying the fighters along a stretch of the boulevard. His friend Musbah, or Abu Hussein, was short and agitated. He would rush from one skirmish to another, leading the men through tunnels under apartment blocks, moving through bedrooms and kitchens, picking positions behind lace curtains to snipe at government soldiers.

‘Before we entered Aleppo we were promised ammunition,’ Hussam said. ‘They told us to start the fight here and that they would get us support. Well, we got some.’ Like a provincial pharmacist dispensing his precious tablets individually wrapped, the captain carried out his daunting job frugally and with minute attention. His reserve cache of ammunition, which was to service the whole frontline, had dwindled to one thousand Kalashnikov bullets and six RPG rockets. The fighters harangued him: they needed ammunition but he had none to give.

He had recently been in a meeting with other Aleppo commanders. The cracks between the military councils and the battalions starting to grow. ‘The Islamists at the meeting attacked the councils,’ he said. ‘They’re furious that the officers control the new ammunition. They think we want to bring in military rule, and they consider us infidels because we once supported the regime.’

‘This is a secular nation,’ his friend Musbah said. ‘They want to bring back the days of the caliphate.’

A week later, Musbah was killed, and whatever ammunition he was able to get was gone. The men were complaining more than ever, so Hussam decided to go north to find the leaders of the Aleppo military council to ask about his promised ammunition. He drove for several hours through hayfields and villages, heading close to the Turkish border. He arrived at a luxurious villa with whitewashed walls and a large swimming pool and was led inside. The marble floors were cold and clean. The fridge was stuffed with meat, fruit and even an ice cream cake. A few journalists, French and Arab, lounged around in the marble hallway using the wifi. Maybe it was the heat, the death, the weeks of fighting at the front or maybe the sugar rush from the ice cream cake, but Hussam’s nerves snapped and he started shouting.

‘You guys should really come down and see what’s going on. We’re dying down there.’

The head of the council, a former colonel in combat fatigues with a Vietnam-era flack jacket, arrived along with his assistant and bookkeeper, a former teacher called Ali Dibo, now treasurer of the arsenal. Hussam was taken aside, promised his ammunition again and sent back to Aleppo.

Ali Dibo drove me in his fancy car to another large villa in a nearby village. An old Mercedes truck was parked outside, covered in a tarpaulin. Fighters stood around under the orange trees. Two commanders were waiting to see Ali, now no longer the meek subordinate he’d been in the presence of the head of the military council but sporting the air of supreme commander of the faithful. He interrogated one of the men: ‘Why do you need so much ammunition?’ But he signed the necessary papers and the men under the orange trees started unloading crates of ammunition from the truck into a waiting pickup. The big truck was the council’s mobile armoury, containing 450,000 rounds of bullets and hundreds of RPGs.

Ali Dibo turned to another supplicant. ‘All I want from you is a short video that you can put on YouTube, stating your name and your unit and that you are part of the Aleppo military council. Then you can go do whatever you want. I just need to show the Americans that units are joining the council. I met two Americans yesterday, and they told me we won’t get any advanced weapons until we show we’re united under the leadership of the officers in the military councils. Just shoot the video and let me handle the rest.’

Months later I visited Hussam. He had discovered that the ex-teacher had been running his own show, siphoning off weapons intended for frontline troops and using them to build his own power base. Hussam sank into a sofa in the small apartment where he lives with his wife. Metal spikes stuck out of his leg: not long after he was sent back to Aleppo his car flipped over as he tried to flee an aerial bombardment. One of his close friends was killed – in fact most of his friends were by now either dead or seriously injured. ‘Ali Dibo was building his own personal fiefdom. He was using the ammunition destined for Aleppo to curry favour with other commanders.’ The military council, he said, was now just one more militia among the feuding battalions. ‘The problem is that every time they set up a council to oversee the war effort it turns into a militia. They can’t differentiate between their own personal interests and those of the nation.’

Last November, under pressure from the Americans, and with promises of better funding and more weapons from the Gulf nations, all the opposition factions met in Doha. A new council was created, called the National Coalition for Syrian Revolutionary and Opposition Forces. Under its aegis a new military command structure was supposed to include all fighting groups, commanders inside and outside the country. But the promised flow of weapons never materialised: there were small amounts of ammunition, but no major shipments. Only weapons bought from Iraqi and sometimes Turkish smugglers were still getting through.

I stood with Abu Abdullah on a muddy hill not far from the Turkish border. Nearby was a makeshift refugee camp, with sewage water trickling between the tents and children shivering in front of a water truck, where they were playing with the shiny pots distributed by a relief agency. Some put them on their heads like helmets, others sat on them. The fence separating us from Turkey had collapsed; two Turkish army jeeps rumbled up and down the road.

Abu Abdullah pointed at a Turkish military outpost further down the hill. ‘This is where we did the handovers of shipments: they drove them to the post and we took over from there, but now we’re only getting ten to fifteen thousand rounds a week. It’s nothing. Iraq has been the main provider, but we can’t get anything interesting from there either. I sent people looking for weeks and we only found one anti-aircraft gun.’

After giving up on the Turks and their Armament Room, Abu Abdullah and his friends turned to the Libyans. Libya is both a fervent revolutionary power and a huge weapons market. ‘In Iraq we buy a certain number of bullets but in Libya they sell them by the weight, by the ton, and it’s dirt cheap. But we can’t ship them by sea. Thirteen countries control the waters in the Mediterranean and we need permission from all of them or from the Americans. So the Qataris fly the weapons to Doha and then they ship them down from Turkey.’

We drove along the border looking for a place to cross, but stopped by mistake in front of the wrong gate. A bearded man in a military jacket appeared carrying a Kalashnikov. He waved us in with his flashlight, but then an older man came over and ordered us to halt.

‘We want to cross into Turkey,’ Abu Abdullah said.

‘You can’t, this is private property,’ the old man said in heavily accented Arabic. There were three tents behind him and material for more. ‘You have to leave immediately,’ he said, politely but firmly. This camp, right on the Turkish border, was for foreign jihadis – the only people, as Abu Abdullah complained, who were getting money and equipment these days. Hakim al-Mutairi, a Kuwaiti Salafi preacher, was sending them millions of dollars. ‘I confronted him at a meeting a few weeks ago,’ Abu Abdullah said. ‘I told him you are hijacking our revolution. The jihadis are buying weapons and ammunition from the other units. They have no problem with money.’

At the end of January, I met a friend of Abu Abdullah; he’d once been a wealthy man, a merchant, but he’d seen his wealth dwindle as all his businesses came to a halt. His lips were quivering with anger and he kept thumping the table with his fist.

‘Why are the Americans doing this to us? They told us they wouldn’t send us weapons until we united. So we united in Doha. Now what’s their excuse? They say it’s because of the jihadis but it’s the jihadis who are gaining ground. Abu Abdullah is $400,000 in debt and no one is sending him money anymore. It’s all going to the jihadis. They have just bought a former military camp from a battalion that was fighting the government. They went to them, gave them I don’t know how many millions and bought the camp. Maybe we should all become jihadis. Maybe then we’ll get money and support.’