The bombing that killed 72 people in Pakistan on Sunday is the latest troubling sign that ISIS has established a dangerous presence in a country long considered an al Qaeda stronghold.
The violent Pakistani Taliban offshoot known as Jamaat-ul-Ahrar — which boasted that it targeted Christians in a crowded park in Lahore — once publicly declared support for ISIS. Now it's the subject of an intensive crackdown in the world's second-most populous and only nuclear-armed Muslim nation.
U.S. intelligence officials told NBC News they believe Jamaat-ul-Ahrar was responsible for the brazen attack.
No immediate links between the bombing and the Islamic State have emerged, but two U.S. intelligence officials told NBC News that Washington and Islamabad are concerned about indirect connections between ISIS and Sunday's atrocity and other terrorist acts in the past year.
They say ISIS has influenced and at times co-opted members of Jamaat-ul-Ahrar and many other Pakistani militant groups as part of an aggressive campaign to extend operations into South Asia.
Many of those groups previously swore allegiance to al Qaeda or various Taliban groups in Afghanistan and Pakistan, where it is known as the Tehreek-e-Taliban Pakistan or TTP. Both U.S. and Pakistani authorities believe these groups' more recent affiliations with ISIS — often loose and informal — have driven some of them to unprecedented levels of violence against civilians and other soft targets.
ISIS' special regional branch for South Asia, known as the Islamic State of Khorasan, has successfully targeted angry young Pakistanis who believe Taliban groups have gone soft. Hundreds left to join ISIS in Syria, and some returned to build support for ISIS on Pakistani soil, according to Pakistan officials and experts.
ISIS is recruiting heavily in Pakistan's cities, using the Internet, social media and even flyers and "chalkings," or wall markings to entice young urban professionals.
"It's a heavy propaganda effort, tailored to specific audiences to try and indoctrinate youth, consistent with the practice they use in Syria and Iraq, but specifically for Afghanistan and Pakistan," a U.S. intelligence official told NBC News.
In many cases, the ties between militant groups and ISIS are hard to detect, especially in a country where family connections run deep when it comes to waging jihad.
"Some members of ISIL are former members of the TTP, which means they still have family members and friends and acquaintances that still remain in the TTP," the intelligence official said, referring to ISIS by another commonly used acronym. "And those bonds are connections. In terms of cooperation, we don't know how much there is."
Pakistani authorities have detected ties between ISIS and some attacks, including the assassinations of several high-level government officials and a May 2015 attack in which eight gunmen stormed a Karachi bus and killed 46 Ismaili Shi'ites. In that case, also linked to the Jundullah militant group, authorities said they found evidence of an "ISIS Women Wing" in Pakistan and ties to a brother of Ramzi Yousef, the convicted mastermind of the first World Trade Center bombing in 1993.
Attackers also have left behind ISIS pamphlets after grenade attacks on prominent media organizations in Karachi and the targeted killings of three police officers in Faisalabad.
U.S. intelligence officials told NBC News that they have uncovered significant evidence that ISIS was recruiting heavily in Pakistan before Jan. 10, 2015, when it announced the formation of the Islamic State Khorasan.
Some prominent al Qaeda and Taliban militants defected to the new group and pledged allegiance to ISIS leader Abu Bakr al-Baghdadi. One early supporter wasJamaat-ul-Ahrar, a hard-line splinter group with close ties to al Qaeda that broke from the broader TTP in August 2014.
From the outset, Jamaat-ul-Ahrar claimed inspiration by the success of ISIS, said the groups were fighting for a common cause, and pledged that Pakistan would be part of its promised Islamic Caliphate.
"We will see whether we can fight better for the cause on our own or by joining IS...if the offer is serious, the matter will be decided by our political shura," spokesman Ehsanullah Ehsan, the same person who claimed credit for Sunday's attack in Lahore, told reporters in early 2015.
The group later appeared to back away from a formal declaration of allegiance, terrorism analyst Arif Rafiq told NBC News.
But the ties persist.
"We believe that the group supports ISIS' ideology, and even its magazine is named 'Revival of the Caliphate,' indicating support," Laith Alkhouri, a counterterrorism analyst at the Flashpoint threat intelligence firm, told NBC News. "Its operations in Pakistan are also conducted in some areas where ISIS cells reportedly operate."
Many of Jamaat-ul-Ahrar's attacks are too violent for the regular TTP, and more like ISIS, Alkhouri added. "They are likely collaborating with ISIS in Pakistan, but we are yet to see a full-fledged merger."
As authorities look for ties between the two groups in the aftermath of Sunday's attack, they are also watching with growing concern as ISIS has made deeper inroads into other militant groups in Pakistan and Afghanistan.
Initially, the ISIS Khorasan affiliate launched a series of suicide bombings, targeted killings and kidnappings against civilians and security forces in the border regions. That prompted the U.S. to list it as a Foreign Terrorist Organization in January, and to kill at least four of its senior commanders in airstrikes.
Some Pakistani officials, like recently retired Gen. Tariq Khan, downplayed the threat, saying ISIS in Pakistan is mostly the same militants as ever, but with a new name - not any operational support from headquarters in Syria.
"These groups keep changing names to suit their convenience," Khan told NBC News. "To me it is regurgitating the same people with different labels. There is no serious induction or infusion of any foreign groups."