One side, Isis (Islamic State), is formed of bands of bloodthirsty nihilists, who advertise themselves with gruesome public executions and roam the desert in convoys of pickup trucks and makeshift suicide truck bombs welded together with scrap metal sheeting.
On the other side, Britons, Americans and other young men are piling in to defend what they see as civilisation itself.
"These are people with one goal - to fight Daesh," Alan Duncan, a former British soldier now training an Assyrian Christian militia allied to the Kurdish forces in northern Iraq, told me from the Kurdish city of Dohuk.
Daesh is the universal term in the Middle East for Isis; it is the acronym of its name in Arabic.
Another former soldier, Konstandinos Erik Scurfield, this week became the first Briton to die fighting Isis for the Kurdish cause. He was holed up alongside the YPG in Al-Hol, in northeastern Syria - the country's main oil-producing region which, during the past four years, has been fought over by the Kurds, Isis, the regime of Syrian President Bashar al-Assad and the al-Qaeda-linked group, Jabhat al-Nusra.
Al-Hol was one of several towns along the banks of the Euphrates where, until recently, Isis had begun to feel comfortably ensconced. It was there that last month it carried out one of its trademark public punishments, shooting and then crucifying four men they accused of "banditry".
The "foreign fighters" who have joined in these battles, like Scurfield and Alan Duncan, are an eclectic bunch, united only in their hatred of such horrors. They are far more diverse than the alienated, disenchanted Muslim boys who have flocked from London, Portsmouth, Paris and Amsterdam to join the ranks of Isis.
Duncan, who served 11 years with the Royal Irish Regiment in Ulster and found he could succeed, but not really settle, in his second career installing double glazing, is perhaps the most obvious example of the hardened ex-squaddie.
Dismissive of those he doesn't take to, contemptuous of Isis' "murdering bastards", he painted a black-and-white view of his moral universe when we spoke earlier this year.
Daesh had to be fought like the IRA had to be fought, he said.
He had what he admitted was a "rather conservative" view of politics. He couldn't understand why Britain and the West had, in his view, encouraged the jihadists to get out of hand, and why they weren't doing more now to stop them.
The British Government, he said yesterday, was trying to stop people like him joining the Kurdish army, or Peshmerga.
"Screw them," was his response. "We are here for the Kurds, not our government."
Scurfield seems to have been a bit more of a philosopher. On his Facebook page he linked to Guardian articles about the Elgin Marbles and made other references to the Greek heritage he inherited from his mother. In a clever reference to his future plans, a prophecy even of his death, he had chosen as his profile picture the famous Orientalist portrait by Thomas Phillips of Lord Byron, the poet who died while volunteering to fight for Greek independence from the Ottoman Empire.
These men's professed idealism is a far cry from an even more bloodthirsty era, when ex-British soldiers signed up as mercenaries in Africa's civil wars. From the 60s onwards, guns-for-hire joined revolutions - or prevented them - acquiring a mixed reputation as adventurers, thugs and agents of murky CIA plots.
The nadir of that era came when another former British soldier of Greek origin, Costas Georgiou, went berserk while working for the Western-backed anti-Marxist revolutionaries of Angola, killing a large number of captive soldiers.
The big difference with the anti-Isis gunslingers is that they are not in it for the money. Most are paying their own way, some via fundraising websites. Some are not ex-military - those who have been and come back describe a motley band of retired teachers, surfer dudes and, in perhaps the best-known case, a man called Matthew Van Dyke, a journalist who became smitten with the "cause of freedom" and took up arms first in Libya, then Syria and now Iraq.
Perhaps as a result, the Kurdish authorities, at least in Iraqi Kurdistan, are now becoming concerned, discouraging the Peshmerga from taking volunteers. Even the YPG is weeding out those it thinks not up to the task after some unfortunate experiences with men who disappeared when the fighting got too hot.
Some volunteers are concerned about the heavily religious "war of civilisations" discourse of their brothers-in-arms - people like Brett Royale, who fought with the Americans in Iraq in 2007 and has returned to join an Assyrian Christian militia, describing himself as a "crusader".
The Kurds and the Assyrians, though largely Sunni Muslim and Christian respectively, prefer to emphasise that they are fighting for a secular, not a religious, identity.
But Jordan Matson, however, is accepted. In fact, He has become the de facto leader of the YPG's international brigade - sometimes known as the Lions of Rojava, after a Kurdish region - and his fellow fighters are happy to respect his prayers.
For most of these men, though, their idealism is of the modern era, a contrast to the seventh-century millenarianism of the jihadists they face. Last September, before he went off to his personal war, Kosta Scurfield posted on his Facebook page: "How can we expect righteousness to prevail when there is hardly anyone willing to give himself up individually to a righteous cause? Such a fine, sunny day, and I have to go, but what does my death matter, if through us, thousands of people are awakened and stirred to action?"
These are the last words of Sophie Scholl, a young member of the German anti-Nazi resistance group White Rose, who had distributed leaflets condemning the Third Reich's war. Shortly after she uttered them, she was led out to be beheaded.