NEW DELHI: The Taliban and so-called Islamic State have a lot more in common than first meets the eye. For one, most Islamic State fighters are former Taliban soldiers, and even now, loyalties keep changing. Despite the common ground, the two militant groups have been engaged in pitched battles over the last year, especially in eastern Afghanistan as the rival sides have sought to carve out spheres of influence and control.

This, however, has changed in the last few months. Afghan officials say that the two insurgencies seem to have worked out patchwork deals acting as ceasefires that have led the two groups to stop fighting each other and concentrate on attacking Afghan and US-led foreign forces.

“They fought deadly battles with the Taliban before. But over the past two months, there has been no fighting among them,” Gen. Mohammad Zaman Waziri, who commands Afghan troops in the east, told the Wall Street Journal.

The informal alliance is significant from the perspective that it has enabled the Islamic State -- which has only a nascent presence in Afghanistan -- to extend the reach of its attacks by freeing up fighters from battling the larger, more dominant Taliban group. Significantly, one of the worst attacks in the country in recent years was claimed by the Islamic State, as suicide bombing killed 80 people in Kabul in July.

The presence of the Islamic State in Afghanistan has been the subject of a lot of international attention ever since last year, when reports emerged that the group was gaining a foothold but recruiting disenchanted Taliban fighters.

In reality, however, it is unclear what the exact relationship is between fighters swearing allegiance to the Islamic State (also known as Daesh) in Afghanistan and the parent group in Syria and Iraq. The question remains whether the Daesh parent group is actively involved in recruiting or training or is the Islamic State in Afghanistan an independent initiative that bears the name for the sake of bearing the name?

Nonetheless, the attacks claimed by Daesh in Afghanistan saw a steady increase. In May last year, a suicide bomber detonated his explosives-laden vest outside a bank in Jalalabad, the capital of the eastern province of Nangahar, killing at least 34 people and injuring 125 others.

The attack was claimed by a group called ISIS Wilayat Khorasan, with a statement issued naming the suicide bomber as Abu Mohammad Khorasani. A photograph purportedly of Khorasani was included, showing the attacker seated on a prayer mat, a scarf covering his face and a Kalashnikov rifle by his side. A black Daesh flag was visible in the background.

Referring to this claim, Afghan President Ashraf Ghani said: “Who claimed responsibility for the horrific attack in Nangahar today? The Taliban did not claim responsibility for the attack, Daesh claimed responsibility for the attack.”

At the time unconfirmed reports indicate that the Taliban and Islamic State have declared “jihad” against each other. Helmand province police chief Nabi Jan Mullahkhil was quoted by Afghanistan's Mashaal Radio saying that authorities had obtained “documents” that suggest that the two militant groups had turned on each other, according to independent news outlet Khaama. Khaama reported, “Reports of minor clashes between the fighters of Taliban group and the newly emerged Daesh have published in the past.”

Whilst the above portrays a frightening scenario, with disgruntled Taliban fighters providing a suitable recruiting ground for the Islamic State’s aspirations in the region, the presence of the Syria and Iraq-based militant group in the South Asian country is still fairly limited.

In fact, despite Ghani’s announcement, Afghan officials and Nato forces in Afghanistan have gone on the record to say they doubt the claims of the Islamic State’s influence in the country. Daesh’s claim on the attack in Jalalabad has also been questioned. "We have not yet seen evidence of ISIS direction or support of the attacks," Lt. Col. Christopher Belcher, spokesman for the international military coalition in Afghanistan, said in a statement reproduced by Reuters.

"Jalalabad continues to be an area with significant Taliban influence, and this attack fits the pattern of past Taliban attacks in the region, underscoring that this attack does not represent a fundamental change in the security environment."

A similar position was put forth by a spokesperson for Afghanistan's Ministry of Defense. "I do not believe that it was carried out by Daesh," Brigadier General Dawlat Waziri said, as quoted by Reuters.

Daesh itself seems to be unclear on whether it carried out the attack or not. “ISIS was not behind the deadly blast in Jalalabad, and we condemn such an attack,” Sheikh Muslim Dost, a spokesperson for the group in Afghanistan, told The Daily Beast. “This is an act of the Pakistani agencies to damage reputation of the ISIS.”

These may seem like two contrary positions. Does the Jalalabad bombing suggest that Daesh is a contender in Afghanistan or does it not?

Reports of Daesh in Afghanistan began to emerge in 2014, when in September insurgents reported to be associated with the group battled Afghan security forces in the Arjistan district of Ghazni province. At the time, officials reported that the insurgents had raised the black flag of the Islamic State. However, the incident is now mired in controversy as the officials recanted their statements and said they had embellished the story so as to receive more resources.

In February 2015, Afghan President Ashraf Ghani’s Chief of Police denied that Daesh was present in the area, insisting that the insurgents were local Taliban fighters.

Nevertheless, Daesh announced its expansion into “Khorassan Province” and officially appointed Hafiz Saeed Khan as the Wali (Governor) of Khorassan. The group also appointed former Guantanamo Bay detainee and senior Taliban leader Mullah Abdul Rauf Khadim as Khan’s deputy. The appointments and announcements followed a video released in January 2015 -- by disgruntled Tehreek-i-Taliban Pakistan (TTP) militants and a handful of little-known Afghan Taliban fighters -- that pledged allegiance to Daesh.

Since then, there have been isolated reports of Daesh’s black flag being raised in parts of Afghanistan. In Farah province for instance, a group of militants who pledged allegiance to Daesh set up a training camp; in Sar-i-Pul province, local officials reported that insurgents had raised the black flag of Daesh in Kohistanat district; in nearby Darzab district of Jawzjan province, 600 insurgents reportedly raised the black flag and began fighting on behalf of Daesh.

Earlier last year, in Nangarhar province, Taliban factions and Daesh-affiliated insurgents clashed in what was widely perceived to be a turf war. In March, Afghan National Army (ANA) officials reported that a clash between rival Taliban and Daesh factions in the Arghandab district of Zabul had killed seven Daesh fighters. Also earlier in March, Hafiz Waheed, a Daesh-linked militant was killed in an airstrike in Afghanistan.

However, it is important to note that these are isolated incidents, which have been difficult to verify The Taliban continues to remain the main extremist group opposed to the government in Afghanistan. The alliance, however, will benefit both the Taliban and the Islamic State, as it will enable both groups to step up attacks against government and foreign forces. This comes at a time when civilian casualties have reached yet another record high in the war torn country.