Col. Yadgar Hijran, a Peshmerga commander, stands among his soldiers on a front line where Kurdish-controlled land borders ISIS-controlled territory on the outskirts of Makhmour in northern Iraq. (Alice Martins/Washington Post)

CONFRONTING THE ‘CALIPHATE’ | This is part of an occasional series.

Along the vast, zigzagging perimeter of the Islamic State’s self-styled state, the militants are steadily being pushed back as the forces­ ranged against them gain in strength.

In the process, new borders are being drawn, new fiefdoms are being carved out and the seeds of potential new conflicts are being sown.

A war seen by the United States as primarily aimed at preventing future terrorist attacks in America is being prosecuted for very different reasons by the diverse assortment of Shiite, Kurdish and Sunni fighters battling in both Iraq and Syria, often in pursuit of competing agendas that work to subvert the goal of defeating the militants.

In northern Iraq and Syria, Kurds are busily carving out the borders to new Kurdish enclaves. Shiite militias, now the most powerful force in Iraq, are extending their reach deep into traditionally Sunni areas of northern Iraq. The Syrian government is focusing its energies on reclaiming land seized by its opponents during the five-year-old rebellion against it, while deeply divided Syrian rebels in turn are fighting a two-front war to hold their ground against both the government and the Islamic State.

In this fragmented landscape, the Islamic State is but one of a multitude of groups competing for territory and dominance over the collapsed nation states of Iraq and Syria — a symptom as much as a cause of the scramble for power unleashed by the U.S.-led invasion of Iraq in 2003 and the 2011 revolt in Syria.

The Islamic State may or may not be vanquished soon — and a string of defeats inflicted in recent months in northeastern Syria, northern Iraq and most recently Ramadi have raised hopes that its demise may be closer than had been thought.

Army Col. Steve Warren listed the names of 10 Islamic State leaders killed by coalition airstrikes in the past month. Charaffe al Mouadan, who had a 'direct link' to the Paris attackers, was killed Dec. 24, in Syria. (Reuters)

But already it is becoming clear that victory over the militants won’t end the bloodshed in the region, said Fawaz Gerges, a professor of international relations at the London School of Economics and Political Science.

“There is little thought being given to the morning after, and the morning after is going to be as bloody, as chaotic and as destabilizing as the situation we are seeing now,” he said. “The heart of the Middle East has changed. The fragile state system is no longer there.”

Along some of the war’s front lines, the ways in which the battle against the Islamic State is redrawing the map of the Middle East — perhaps irrevocably — come sharply into focus.

Map: What a year of Islamic State terror looks like

Men of all ages — and in a few places, women — are fighting courageously against desperate and well-armed jihadists, in some instances carrying only the hunting rifles their families owned long before there was war.

But there is no single unifying plan, and no overarching goal, only a jigsaw puzzle composed of the collapsed fragments of Iraq and Syria.

Kurdish push in Syria

One piece of the puzzle is taking shape along a road called the M4 on most maps, and the International Highway by those who live in its vicinity. It links northern Iraq to the Mediterranean coast of Syria, and it has served as a supply route for the Islamic State across the mostly erased Syria-Iraq border.

In northeastern Syria, it also roughly tracks the front line between the frontier of the Islamic State’s so-called caliphate and the lands claimed by Syria’s minority Kurds, who have emerged as one of the single-most-effective U.S. partners in the war.

Raqqa, the Islamic State’s self-proclaimed capital and the next priority of the U.S. military campaign, lies 30 miles to the south.

But Raqqa, an Arab city, is not a priority for the People’s Protection Units, or YPG, the Kurdish force that is busy consolidating its control in northeastern Syria. In the past year, the YPG has expanded the territory under its control by 186 percent — compared with a 14 percent shrinkage for the far larger territory controlled by the Islamic State — making it by far the biggest winner in the wider war, according to figures compiled by the IHS Conflict Monitor.

The YPG’s sights are now set on another stretch of Kurdish land, the isolated enclave of Afrin far to the west, in the province of Aleppo, surrounded by territory controlled by an assortment of Syrian rebels. In an effort to link up with Afrin, the focus of the fighting has shifted there, putting the Kurds in conflict with local Free Syrian Army groups and, potentially, Turkey, which has vowed to prevent the creation of a Kurdish enclave in the area.

The Raqqa front line has been left to a ragged assortment of former Raqqa rebels who were driven out of the city by the Islamic State. They are fighting in sandals with ancient Kalashnikovs alongside a crude earth barrier thrown up in the desert just to the south of the town of Ain Issa. Their relations with the YPG are tense, and they have been overlooked in the effort by the Pentagon to arm Sunni allies to take on the Islamic State in Sunni areas.

But a strategy that relies on a Kurdish force to counter the Islamic State in Arab areas “is destined to make things worse, not better,” said Robert Ford, the former U.S. ambassador to Syria who is now with the Middle East Institute.

“The Americans are aiding in the establishment of a unilaterally declared autonomous Kurdish zone, and Arab Syrians will not accept it,” he said. “Where this leads to is the partition of Syria, and it’s going to make it harder if countries are fragmented in this way to take on the Islamic State.”

Kurdish-Arab fault line

A similar dilemma prevails across the border in the Kurdish region of northern Iraq, on the battlefield just south of the once-mixed Kurdish-Arab town of Makhmour, whose capture by the Islamic State in August 2014 helped precipitate U.S. airstrikes. The jihadist occupation lasted barely 48 hours before U.S. warplanes intervened and the Islamic State retreated, in the first indication that air power could prove decisive in stemming and then reversing the militants’ ­advances.

The front line since has barely shifted. A labyrinth of trenches, earthen barricades and sandbags snaking across the fertile plains of northern Iraq’s Nineveh province separates the combatants and also forms the southernmost frontier of the territories claimed by the regional government of Kurdistan as part of its still-undeclared Kurdish state.

The villages beyond are wholly Arab, and the Kurdish peshmerga forces manning the line say they have no intention of pressing forward, even though they believe they could.

“Here on this front line we won’t advance any further because this is Arab land,” explained Col. Yadgar Hijran, who commands forces­ along a stretch of the front line. “If anyone is to free these areas, it should be Arabs, because if Kurds free them, then it will become an ethnic war.”

In many ways, it already is. Spanning the Kurdish-Arab fault line that runs across northern Iraq, Makhmour has long been contested and was among the areas targeted in the 1980s by Saddam Hussein’s “Arabization” program. Surrounding Kurdish villages were razed and their lands given to Arab settlers, often from other parts of the country. The Kurdish peshmerga seized control of Makhmour after U.S. troops swept into the area in 2003, and many of those Arabs fled.

Under Iraq’s new constitution, the final status was to have been settled by a referendum, but that plan has become moot since the war against the Islamic State began. The president of the Kurdish region, Masoud Barzani, has said the Kurds will never surrender any of the lands they have recaptured. Talk of a far bolder referendum, to vote on the complete independence of Kurdistan, is being revived.

“There is a need for brave decisions, to look at the realities and let people decide what they want,” said Masrour Barzani, Kurdistan’s national security chief. “Iraq has broken apart. Sunnis believe in a united Iraq only if Sunnis rule it. Shiites believe in a united Iraq only if Shiites rule it. There is no single definition of a united Iraq.”

“Trying to keep the country united against the will of the people is not going to succeed,” he said.

Shiite conquests

That’s not a view shared by the Shiite militia fighters battling the Islamic State 40 miles to the south, outside the destroyed Baiji oil refinery. The facility was finally recaptured in October after more than a year of back-and-forth battles, with Shiite militias fighting under the umbrella of the Hashd Shabi — as the popular mobilization units are known — playing an instrumental role in securing the victory alongside Iraqi army units, according to the Iraqi government and army units on the ground.

The front line now has shifted northwest into the Makhool mountains, a strategic ridge of barren hills overlooking the refinery and also the main highway leading to Mosul, the biggest city controlled by the Islamic State and a key target of the fight.

This is also indisputably Sunni territory, now in the process of being conquered by Shiites fighting far from their homes in the Shiite south of the country — motivated, say young fighters, by duty to their religious leaders. Along the length of the 200-mile highway leading north to Baiji from Baghdad lie the ruins of Sunni towns and villages, destroyed by airstrikes and artillery in the fight to dislodge the Islamic State.

“We are following the orders of our marjaya” — the Shiite religious authorities in Najaf — said Sattar Ahwan, one of about two dozen men massed beneath a ridge on the hillside as bullets zinged and mortar fire crumped overhead. He, along with many of the fighters, wore an armband featuring the face of the late Iranian leader Ayatollah Khomeini, a reminder of the divergent loyalties complicating the battlefield.

The Shiite fighters are nonetheless fighting for a united Iraq, insisted two commanders from the Kataeb Sayed Shuhada, a Shiite militia that has also sent fighters to Syria, at a command post behind the front lines on the edge of the nearby town of Baiji. “The Hashd are the sons of Iraq. Our role is to fight for the sake of Iraq,” said Alaa al-Husseini, who comes from Najaf and wears a turban, signaling his role as a religious adviser to the fighters. “We are all Iraqis, Sunnis and Shiites, and this crisis has made us unite.”

Behind him, the flags of the assorted Shiite militias participating in the fight fluttered over Baiji, long since emptied of its inhabitants and now almost destroyed.

A separate Sunni entity?

For the few Iraqi Sunnis engaged in the fight against the Sunni Islamic State, the symbolism of such scenes, broadcast widely on television, is obvious — and worrying.

Amiriyat Fallujah, in the western province of Anbar, is one of the few Sunni towns that held at bay the Islamic State onslaught into most of the country’s Sunni regions last year, and it is one of the first where local Sunnis are being deployed in the fight against the Islamic State. Several hundred local Sunni tribesmen trained by U.S. troops returned there in late October, and they launched their first offensive in November, alongside Iraqi army troops.

It went well. A front line that had endured since the Islamic State’s advances­ early in 2014 crumbled within 36 hours. The tribesmen took control of an extra three miles or so of land. The new front line is barely distinguishable from the old, except that the old trench dug in the desert had filled with plastic bags and water bottles, whereas the new one is dug from freshly churned earth. It also puts the fighters three miles closer to Fallujah, the first Iraqi town to be captured by the Islamic State nearly two years ago.

As is the case along other front lines, the fighters say they are confident they could easily gain more ground and perhaps take Fallujah itself if they had sufficient support — from the Iraqi government and from allies such as the United States.

“As soon as they saw our ­forces, they ran away,” said Faisal al-Issawi, a local tribal leader who commands forces­ along one stretch of the newly dug front line. “They still have power, but it’s not the same as a year ago. Airstrikes made them weak and are breaking their structures. Every week they execute four or five members because they refuse to obey orders or try to turn against their leaders.”

But weapons have been hard to come by on this neglected front, where actual fighting is rare. None of the tribal fighters wear uniforms, and some are armed only with ancient rifles, owned by their families for generations, according to one fighter, who said he was 60 but looked older.

The Shiite-dominated government has been reluctant to arm the Sunni tribes for fear of empowering potential rivals, and the Sunnis here are already questioning their future in an Iraq now more firmly dominated by Shiites than ever before.

“Even those who are loyal to the central government and fight ISIS are treated like foreigners” by the central government, said Shaker al-Issawi, the mayor of Amiriyat Fallujah, as he visited his men on the front line.

He is among a small but growing number of Sunnis who are starting to embrace the idea of forming a separate Sunni entity, along the lines of the semiautonomous Kurdish enclave in the north.

“If the people of Anbar felt respected, as Iraqis, they would be loyal to us and fight ISIS,” he said. “But we are not respected, and I fear the only solution is a Sunni state.”

It is not a mainstream view among Iraqi Sunnis, Suhaib al-Rawi, the governor of the province of Anbar, said in an interview in Baghdad ahead of the recent victory of Iraqi government troops in Ramadi.

“It’s not only a bad idea, it would be a catastrophe,” he said, citing the battle for Ramadi, fought by the Iraqi army, as evidence that Iraq can survive. “Iraq was always a united nation and a great regional power. It is in the best interest of everyone to remain united.”

But they are not united, said Gerges, the London School of Economics professor, who questions not whether Iraq or Syria should be partitioned as part of an ultimate solution but whether they can be salvaged at all.

“The puzzle is, how do you glue these states back together again?” he said. “They’re gone. They’re gone into a million pieces.”

This is part of an occasional series about the militant group Islamic State and its violent collision with the United States and others intent on halting the group’s rapid rise.

Read more:

The hidden hand behind the Islamic State militants? Saddam Hussein’s.

Life in the ‘Islamic State’: Spoils for the rulers, terror for the ruled

Inside the surreal world of the Islamic State’s propaganda machine

From hip-hop to jihad, how the Islamic State became a magnet for converts

5 stories you should read to really understand the Islamic State

Mustafa Salim in Baiji and Ameriyat Fallujah.contributed to this report.