There are more than 6,000 Pakistani insurgents hiding in Afghanistan, a UN report this week said.
It said Al Qaeda has hundreds of fighters, including its leader Ayman Al Zawahiri, in the country, and the Afghan affiliate of ISIS remains a threat.
Most of the Pakistani militants belonged to Tehreek-e-Taliban Pakistan, an insurgent group that attacks Pakistani military and civilian targets.
“The total number of Pakistani foreign terrorist fighters in Afghanistan, posing a threat to both countries, is estimated at between 6,000 and 6,500, most of them with TTP,” the report said.
It was compiled by the UN analytical and sanctions monitoring team, which tracks terrorist groups around the world.
The report said the TTP had linked up with the Afghan-based affiliate of ISIS and some of its members had joined the group, which calls itself IS Khorasan Province, or ISKP.
It said the group, which is based in eastern Afghanistan, “remains capable of carrying out high-profile attacks in various parts of the country, including Kabul”.
ISKP has been hit hard by Afghan security, the US and Nato forces supporting it, and by the Taliban.
The ISKP has an estimated 2,200 members and “also aims to attract Taliban fighters who oppose the agreement with the United States”, the report said.
The US and Taliban signed a peace deal in February.
One of the terms of that deal requires the Taliban to guarantee its territory will not be used by terrorist groups.
The Afghan Taliban’s regime was toppled by the 2001 US-led invasion launched after the group refused to hand over Al Qaeda leader Osama bin Laden, who had taken refuge in Afghanistan.
The UN report said Al Qaeda was active in 12 Afghan provinces, with about 400 to 600 fighters, and Al Zawahiri remained in the country.
The group's leadership maintains close contact with the Haqqani Network, an offshoot of the Taliban, to discuss co-operation.
Al Zawahiri met senior leader Yahya Haqqani as recently as February, the report said.