An Islamic State offshoot based near the Afghan-Pakistan border is expanding to new areas, recruiting fighters and widening the reach of attacks in the region, members of the movement and Afghan officials said.

Some members of the so-called "Khorasan Province" of Islamic State claimed responsibility for the recent attack on a Sufi shrine in Pakistan that killed 90 people, and IS gunmen were blamed for the deaths of six local aid workers in the north of the country, far from their stronghold in eastern Afghanistan.

Any expansion would pose a new challenge for U.S. President Donald Trump, as he considers how many American troops to keep in Afghanistan where the main security threat remains the Taliban insurgency.

Trump has vowed to "totally destroy" the Middle East-based Islamic State, yet has spoken little of Afghanistan, where U.S. forces have been posted for 15 years.

Now he has not only the stubborn Taliban to consider, but also militants swearing allegiance to IS, although U.S. officials are generally less alarmed about its presence in Afghanistan than local officials.

"Daesh is not only a threat for Afghanistan but for the region and the whole world," said Shah Hussain Mortazawi, spokesman for President Ashraf Ghani's office, using a common Arabic name for the group.

The extent of direct operational links between IS in Afghanistan and the Middle East remains unclear, although most fighters in the "Khorasan Province" are Afghans, Pakistanis or Central Asians.

Still, three members of the group told Reuters a handful of Arab advisers helped direct propaganda, recruiting and identifying targets for attack.

SHIFTING LOYALTIES

IS is suspected of carrying out several attacks on minority Shi'ite Muslim targets in Afghanistan, and the February suicide bombing at the Pakistani shrine bore some of the hallmarks of the sectarian group.

That atrocity, the worst militant assault in Pakistan for two years, indicated that a group based in the eastern Afghan province of Nangarhar could strike deep into Pakistan territory.

"Islamic State has no proper base in Pakistan, but it has sympathizers and links in Pakistan," said one member of the group, based in Afghanistan. "Mostly the attackers and suicide bombers enter from Afghanistan to Pakistan."

Western and Afghan security officials believe fighters frequently switch allegiances between militant groups, making it difficult to know who is to blame for violence.

"Sometimes the Taliban commanders defect to Daesh and sometimes the other way around," said Mohammad Zahir Wahdat, governor of the northern Afghan province of Sar-i-Pul, where IS and Taliban fighters are believed to be active.

"The situation is very unclear."

Even within the group, claims are contested.

The AMAQ news agency, affiliated to IS in the Middle East, said the movement was responsible for the shrine bombing, but Abu Omar Khorasani, a senior member of the Afghan chapter who sometimes speaks for IS there, denied involvement.

He did, however, say IS was recruiting and expanding beyond Nangarhar to northern Afghanistan.

Pakistani counter-terrorism official Raja Umar Khattab said IS carried out attacks from Afghanistan, and his department was investigating whether the shrine bomber came from there.

"We are also working on an angle that a local militant group could have facilitated IS to carry out the ... blast," said Khattab, a senior officer in Sindh province.

"UMBRELLA ORGANISATION"

The top U.S. commander in Afghanistan, General John Nicholson, said U.S. drone strikes and special forces operations had killed about a third of IS fighters in Afghanistan and cut their territory by two thirds.

U.S. officials say intelligence suggests IS is based overwhelmingly in Nangarhar and neighbouring Kunar province. They are sceptical about reports of an increased IS presence in the northwest, where gunmen may claim a connection to the group to boost their standing.

"Certainly if you're a local official who's looking for more resources, by saying that ISIS is in your area, you're going to get more attention," said Brigadier General Charles Cleveland, the main U.S. military spokesman in Kabul.

Nicholson, who has asked for thousands more troops in Afghanistan, said counter-terrorism forces planned a series of operations in 2017 to defeat IS in Afghanistan "and preclude the migration of terrorists from Iraq and Syria into Afghanistan".

Still, bolstered by fighters from Pakistani and other militant groups and an active social media presence, some Afghan officials said it had become an "umbrella organization" for disparate movements.

The Afghan Taliban, waging war to overthrow the U.S.-backed government in Kabul, are fiercely opposed to IS, and the two have clashed as they seek to expand territory and influence.

"We have almost eliminated Daesh in Afghanistan," said Taliban spokesman Zabihullah Mujahid.

Estimating numbers is difficult. Cleveland said U.S. officials believe the movement has only 700 fighters, but Afghan officials estimate it has around 1,500, with twice as many auxiliary helpers and up to 8,000 less active supporters.

Those officials say fighters from Central Asian countries including Uzbekistan have come to Afghanistan, while militants forced across the border by Pakistani military operations also gravitated towards IS.

Khorasani, the IS militant, said it had "thousands" of fighters and was growing.

A U.S. drone strike last year killed former local IS leader Hafiz Saeed Khan, once a member of the Pakistani Taliban. Several Afghan security officials believe a former Afghan Taliban commander, Abdul Haseeb Logari, has replaced him.

Islamic State began to be noticed in the region in early 2015, when loyalists took on the Taliban and al Qaeda in a bid to become the leading Islamist militant group, using tactics that stood out for their brutality even in Afghanistan.