The approach to Gwer, on the Peshmerga-IS frontline, was proving just how green a correspondent I was. Each no-name village between Erbil and the front had me asking: "Is this it?" None was. Each looked and felt as I assumed a Middle Eastern frontline must, their pockmarked concrete buildings caked with dust and characterised by an eerie emptiness that suggested abandonment. But this, my fixer told me, was simply what Iraqi Kurdistan looked and felt like.

The outskirts of Gwer, forty kilometres south-west of Erbil, threw my ignorance into stark relief. To the dust and air of abandonment were added burnt-out cars, which bore witness to recent US airstrikes, IS graffiti that had been painted over upon the villagers' return to their recaptured home last month, and countless Peshmerga checkpoints. These latter were of particular concern. I was not, strictly speaking, supposed to be there, lacking official clearance as a journalist. My passport wasn't nearly enough to convince the guard at the final checkpoint of my credentials and for a moment it looked like we'd have to turn back. Luckily, my fixer, who looked at me with a certain embarrassing incredulity, knew the Lieutenant Colonel on the hill and told the guard that the former was expecting us. "Shall I call him?" my fixer asked in Kurdish. The guard demurred and let us through.

"People need to realise that we are not fighting terrorists," Colonel Chamgeen told me. "We are fighting a well-armed, well-trained, well-financed army."

Such security was, my fixer told me, all relatively recent. He had been to Gwer only a few days before and security had been comparatively lax. But the decision of the US to get involved, along with the IS car bombing in Erbil a few days earlier, which had occurred only a couple of hundred metres from my hotel, had changed the mentality of those on the ground considerably. The Islamic State's PR nous had also doubtless played a role. The Peshmerga were finally trying to operate like a regular army by controlling the narrative. They just weren't trying hard enough to prevent my fixer from getting me past them.

It looked more like a frontline than what I had assumed a frontline would look like: a disasterpiece of undriveable roads and barely-defendable bluffs overlooked the IS positions on the other side of the Great Zab River and we all stopped speaking for a moment as the driver navigated the unsealed streets. The Peshmerga were stationed in an abandoned brick factory on a rise overlooking the water and welcomed us warmly. Their new regulations for dealing with the press—a memorandum had gone out only days before, letting commanders know whom they could talk to and when—clashed fiercely with their traditional sense of hospitality. Someone put in a call to someone higher up the food-chain and while we waited for them to call us back we sat cross-legged on the rug of the brick factory's main office, surrounded by AK47s and M16s, drinking tea.

Unsure about what I was allowed to ask them while waiting to hear whether I was allowed to ask them anything, I stuck to general, ice-breaking questions. How far were we from the IS positions? About two kilometres. ("You can see the black flags from here," one said, "but it helps if you have binoculars.") How long had they been stationed here? A little over two weeks, ever since they retook the town. Were the days long? "Very long," Colonel Omar Chamgeen told me. "Do you think it's easy to fight a war?"

I was struck by how old the commanders all seemed, how doughy they appeared in their olive-green uniforms, as though they had come to front from their jobs as cab drivers and teahouse proprietors, which most of them probably had.

I mostly let them interview me. Like everyone else I met in Iraqi Kurdistan, they were keen to know what the world thought of their struggle, whether people were paying attention. I told them there had been little interest in the Kurdish struggle when it was confined to Rojava, or Western Kurdistan, across the border in north-eastern Syria, where Turkey's Kurdistan Workers' Party (PKK) and Syria's People's Protection Units (YPG) had been fighting the IS for nearly two years. But that had changed with the IS push into Iraq and—it had to be acknowledged—the threat it posed to American oil interests in Erbil. They asked me what I thought was going to happen over the coming weeks and months. I told them I thought that the Peshmerga, with US and maybe international assistance, would push the IS back into Syria, where its fighters would regroup, consolidate their gains, maybe try to capture Aleppo, and eventually try pushing on Iraqi Kurdistan again. They seemed to agree with me. "They will keep trying until they are destroyed," Lieutenant Colonel Sapan Mohamed said.

They rejected my use of the word "terrorism" outright. "People need to realise that we are not fighting terrorists," Colonel Chamgeen told me. "We are fighting a well-armed, well-trained, well-financed army." He estimated that IS fighters in Iraq were armed with at least US$1 billion worth of mostly American equipment, captured from the Iraqi Army when the latter abandoned Mosul in June, and like most Kurds he speculated about which of the Gulf States was helping to finance the organisation. "The Daesh we are fighting across the river"—he used the Arabic acronym for the group, which has derogatory connotations—"have a number of American-built Humvees and at least one DShK heavy machine gun. These are not men with bombs strapped to their chests."

The Kurds at the brick factory were primarily from Halabja, near the Iranian border, famous for being the site of Saddam Hussein's genocidal chemical attack against the Kurds in the dying days of the Iran-Iraq War. I was struck by how old the commanders all seemed, how doughy they appeared in their olive-green uniforms, as though they had come to front from their jobs as cab drivers and teahouse proprietors, which most of them probably had.

By this stage of my time in Kurdistan, I had begun to think of their struggle in terms more abstract than specific, formulating an article in my mind about the clash between the competing -isms of the Kurdish nation and Islam. But asked their primary reason for fighting, all gave pride of place to their families. While they would certainly welcome Kurdish independence, none saw nationalist sentiment as the primary goal of the fighting. The IS represents an existential threat to them, their wives and their children. Any gains for the nation in a wider political sense would be little more than a happy by-product. They found the Kurdish flag pinned to my lapel—a hat-tip to Christopher Hitchens, one of their greatest champions—encouraging, but also rather beside the point.

A young man stuck his head in the door and said something I couldn't understand. I thought the word had come through that they weren't to talk to me. But that was not at all what was happening. "Daesh are coming," my fixer told me. "They want us to leave before the fighting begins."

The change in the men was instantaneous, though they remained hospitable until the end. Even as their faces hardened and they swung their weapons over their shoulders, they made a point to shake our hands. They all apologised that they couldn't stay and chat. I didn't even have time to put my shoes on properly.

Our driver had been the first to see them: six Humvees crossing the river flying the black standard of the enemy. He had the car running by the time we got to it. We had come to Gwer because I had been told that it was one of the safest, quietest places on the frontline, a good introduction to war for a first-timer like myself. Yet here we were, evacuating the area, less than twenty minutes after arriving in it. Lieutenant Colonel Mohamed told us not to leave the way we'd come as there would doubtless by fighting along that road, too.

"They didn't want you there," my fixer said. "It would have been a disaster for them had a Western journalist been captured on their watch." James Foley had been murdered only a few days earlier.

My fixer sat in the back of the car, positioning himself in the middle seat so that he had a good view of the road through the windshield. His eyes were darting from side to side and he told the driver to stick to the middle of the road. We slowed at a checkpoint but were waved through immediately by forces setting up a heavy machine gun. When we finally arrived at a road back to Erbil, I asked what the fixer had been looking for. A former translator for Coalition forces during the last war—what we tend to call the "invasion" and he called the "liberation"—he said he had scanning for IEDs. He had experienced IED explosions before—two in as many days, in fact, back when he was working with the Americans—and he wasn't keen to experience another today. He was also keeping an eye on the buildings ahead of us, he said, looking to see what flags they were flying. None of us knew the road at all and one wrong turn could land us in IS territory. Luckily, every flag he'd seen resembled the pin on my lapel.

I asked what both of them were feeling and was surprised when they claimed a sense of regret. They would have liked to stay with the Peshmerga, they said, to take up arms alongside them and fight. The idea of our driver, at least twenty kilograms overweight, taking an AK47 into battle was faintly amusing, but given what the men at the brick factory had told me it also made perfect sense. I would later learn that my fixer takes up arms every evening, in his hometown of Dibis in Kirkuk Province, patrolling the streets with other young men until first light, not to prevent an IS attack, but rather to send a message to those in town who secretly support the group: not where our families live, not without a fight.

I asked whether we had really had to leave, whether we couldn't have maybe stayed for the battle, not because I had especially wanted to, but rather because they had. "They didn't want you there," my fixer said. "It would have been a disaster for them had a Western journalist been captured on their watch." James Foley had been murdered only a few days earlier.

We received a call from Lieutenant Colonel Mohamed later that day. The fighting had gone on for several hours and been quite heavy, he told us. The Peshmerga destroyed one of the IS Humvees and forced the other five to retreat across the river. There had been no casualties on the Kurdish side, on "our" side, as my fixer put it. Lieutenant Colonel Mohamed apologised again for cutting our meeting short. "I hope the Australian journalist did not consider us rude," he said.

Matthew Clayfield is as a freelance foreign correspondent.