The Kurdish counteroffensive against extremist Sunni militants in northern Iraq is now gathering speed. Local troops from Iraqi Kurdistan, known as peshmerga, are back in control of large chunks of territory — including a string of towns and villages, and the strategically important Mosul Dam — lost to a shock offensive by insurgent group the Islamic State (formerly known as ISIS) earlier this month.

They had help. American airstrikes pounded Islamic State positions, while deliveries of guns and ammunition from the US, Iraq's central government, and others helped strengthen the peshmerga.

Semi-autonomous Iraqi Kurdistan had another equally important ally, although it's one that officials are not keen to talk about; a Kurdish guerrilla group that the US and the EU have branded a terrorist organization due to a history of killings and bombings on civilian and military targets during a 30-year fight for autonomy from the Turkish state.

Hundreds of fighters from the paramilitary wing of the Kurdistan Worker's Party (PKK) reinforced the peshmerga after the Islamic State advance, providing a much-needed boost in morale and fighting abilities. The new arrivals have made a decisive difference in a number of battles, often fighting under cover of US air support.

Driving along the road on the Kurdish side, the Islamic State's black flags are clearly visible fluttering in the breeze.

VICE News met with some of a group of 75 fighters that traveled south from the PKK stronghold in the Qandil Mountains on the Iran-Iraq border to the oil-rich and ethnically mixed city of Kirkuk a little over a week ago.

Losing control of this area would be a huge blow to the Kurds and, while there have not been any major clashes since the Islamic State routed the Iraqi army from nearby territory in June, the front lines are just south of the city. The rival forces are also jammed close together — driving along the road on the Kurdish side, the Islamic State's black flags are clearly visible fluttering in the breeze.

The PKK may not officially be here, but the group is active in the area — its fighters make little attempt to hide themselves, and are immediately obvious. Instead of the camouflage fatigues, body armor, and helmets favored by the peshmerga, they wear an oilve uniform of traditional loose-fitting Kurdish clothes, often paired with a keffiyeh.

While the peshmerga often look well fed and comfortable, the PKK forces are wiry, sun-beaten, and keen. There are women in their ranks too, fighting as equals alongside the men.

Photo by VICE News/Frederick Paxton

The PKK fighters are now defending Kirkuk as part of a mixed force of peshmerga and a few remaining Iraqi soldiers. They operate in a manner roughly analogous to a Special Forces unit — conducting covert night raids behind Islamic State lines.

They told VICE News that they were in the region to prevent the hardline insurgents capturing local non-Arab villages. Many of these are home to minority groups, such as Yazidis and Shabaks, which are considered to be infidels and singled out for persecution by the Islamic State. The PKK presence has provided peace of mind to the civilian population, who say the guerrillas have played a vital role in guarding and regaining territory from the Islamic State.

Salam Kakai, a local resident linked with the Patriotic Union of Kurdistan party, told VICE News that the PKK had been welcomed: "People of this region are worried that the Islamic State will attack us, that they'll massacre our people and kidnap our women… but now, luckily there are Kurdish peshmerga and guerrilla fighters here, they protect the region, that is why the Islamic State couldn't advance more."

While the Kirkuk front has seen only minor skirmishes, PKK fighters have made a decisive difference in larger engagements elsewhere. When the Islamic State attacked the town of Makhmour, near the Iraqi Kurdistan capital of Erbil, the peshmerga forces retreated — either tactically or in shocked chaos, depending on who you ask. Even Ali Faté, a peshmerga veteran who commands the front there, admitted they had been caught by surprise.

Faté told VICE News that the town was subsequently retaken by Kurdish forces, killing eight Islamic State fighters in the process. He added that PKK forces in the region did nothing more than defend the nearby Makhmour refugee camp. "The other Kurdish groups were effective at defending their own territory. They kept their own positions for us," Faté said.

'We want the PKK and YPG to stay and protect us, the peshmerga just left, they sold us out.'

Such is the official version of events. The PKK fighters, however, tell a different story.

It was them, they say, who led the advance and forced the Islamic State to retreat, then pulled back and allowed peshmerga — who only supported from a distance during the offensive — to hold the position.

"The peshmerga forces withdrew from Makhmour, and the comrades [the PKK has Marxist-Leninist roots], stayed there, fought against ISIS and ISIS was defeated," Magid, the commander of the Kirkuk PKK group says, flashing a half smile.

"Afterwards, the peshmerga forces came with heavy weapons and they hit ISIS with Katyusha [Russian-made multiple rocket launchers]. When we captured the frontlines, there was only PKK." The guerillas were responsible for all eight Islamic State deaths, he added.

Photo by VICE News/Frederick Paxton

Others have told similar stories. At a refugee camp in Silopi, Turkey, Yazidis who fled the Islamic State offensive on the town of Sinjar, only to find themselves encircled on a nearby mountain of the same name, said peshmerga retreated with no warning. They claimed the only security had come from the PKK's Syrian offshoot, the People's Protection Units (YPG), which broke through Islamic State lines and provided the Yazidi with a passage to safety. "We want the PKK and YPG to stay and protect us, the peshmerga just left, they sold us out," Neber Janim, 23, told VICE News.

PKK tactics, fighting style, and ethos are all very different from the peshmerga too, which has helped them best the Islamic State in the areas they attacked. Like their opponents, they are skilled, fiercely ideological, and battle-hardened guerrilla fighters. The PKK has been fighting the Islamic State in Syria for more than two years and honed their skills in Turkey, whereas the peshmerga have not been tested in battle since before the US-led invasion of Iraq.

Magid, who is originally from Kalar in Iraqi Kurdistan, puts the PKK's effectiveness down to their training. "The comrades have education and they are professional troops. That is why ISIS is afraid of us. We are not like other forces, we have discipline and a system."

Two groups the US considers terrorists are using American weapons against each other.

Magid carefully avoids directly disparaging the peshmerga. Others are less diplomatic, however. "The peshmerga are weak and couldn't defend against ISIS in Sinjar and other regions," Rabas, 20, a fighter from Kirkuk, told VICE News.

These developments are not something that officials in the Kurdish capital of Erbil are keen to acknowledge. Peshmerga Ministry Spokesman General Halgurd Hikmat also downplayed the role of non-peshmerga troops in recent assaults on the Islamic State, at first telling VICE News that the PKK had played little part whatsoever in the fighting. After a senior officer interjected, Hikmat added: "I can say that the help from the PKK was partial and not in the broad level but at specific points."

However, lawmakers are obviously aware of the contribution the PKK has made. Massoud Barzani, the president of Iraqi Kurdistan, visited a PKK camp in the aftermath of the Makhmour battle, which is a surprising turn of events given previous rivalries between his government and the group.

Photo by VICE News/Frederick Paxton

Having to rely on a onetime political foe will be embarrassing for Kurdish politicians, as will the fact that they even needed reinforcements. The Islamic State's advance revealed the peshmerga, which once enjoyed a fearsome earned fighting Saddam Hussein's troops, to be a less formidable fighting force than many had believed.

The PKK's terrorist group classification is even more awkward, however, given that the US is providing military aid to the peshmerga, as well as backing them with air strikes. America and its allies are barred by international law from providing weapons or training to "terrorist" organizations. Yet as the PKK fighters are at least partly integrated with the peshmerga, it is inevitably left helping one — the latest example of the Islamic State's ability to bring once opposing groups and interests together against them.

'Our aim is not an independent Kurdish state, but a democratic Kurdistan, under a confederate system that defends equality and freedoms.'

The PKK has already received some other help from the US too, albeit third-hand. The Kirkuk forces were driving an American Humvee with PKK markings scrawled on the back, and some were equipped with US-made assault rifles. These were seized from Islamic State militants, who had themselves plundered US-supplied weapons when they routed the Iraqi army in June and subsequently used them against both the Iraqi army and peshmerga.

The result: Two groups the US considers terrorists are using American weapons against each other.

However, the prospect of PKK fighters newly armed with heavy weapons and armored vehicles is not one likely to be relished by Turkey, especially given attacks on Turkish troops this week.

Yet the PKK is at pains to stress that it is a force for democracy, not terror. "The PKK is in the list of terrorist groups because of Turkey and imperialist powers," said one Iranian fighter from Kermanshah. "But the reality is clear like a clean water, and no one can hide it. The PKK proves that it is not a terrorist group but a part of Kurdish forces, it is a force that protect Kurdistan."

Photo by VICE News/Frederick Paxton

The fighter dismissed allegations of abuses committed by the group, saying that they were perpetrated by rotten offshoots. "There were some groups that committed crimes under the name of PKK, they did not belong to the PKK. Our ideology and views are not like ISIS. We didn't slaughter or massacre anyone. All our effort is for our nation, so our nation will have the right of self-determination."

He stressed the PKK's recent change in policy that means it is no longer fighting for independence (an original PKK tenet), but a democratic confederation. "Our aim is not an independent Kurdish state, but a democratic Kurdistan, under a confederate system that defends equality and freedoms," a female fighter from Turkish Kurdistan told VICE News. Magid added that they welcomed other nationalities and religions.

Despite these proclamations, there appears to be little prospect of rescinding the group's status as a terrorist organization, particularly from Turkey. In the meantime, the US seems to have reluctantly decided that, unlike the Islamic State, the PKK is a terrorist group it can turn a blind eye to.