Pakistan's military says it has launched a major operation against so-called Islamic State (IS) in the north-western region along the Afghan border.
A spokesman said militants had gained ground inside Afghanistan and had to be stopped from extending their influence.
He said the "Khyber 4" operation, backed by the air force, would focus on the mountainous Rajgal Valley area in Khyber Agency.
Pakistan has previously denied the presence of IS on its territory.
However, the growth of the group - often referred to as Daesh - in neighbouring Afghanistan has alarmed Islamabad and the group has claimed several attacks in Pakistan over the past two years.
"This operation was necessary because Daesh is getting established there and we have to stop the influence spreading into Pakistani territory through the Rajgal Valley," military spokesman Lt Gen Asif Ghafoor said.
IS in the region is mostly made up of former members of the Afghan and Pakistani Taliban and Gen Ghafoor reiterated the government's stance that the group has no established presence inside Pakistan.
"There is no organised infrastructure and we shall not allow them to establish themselves," he said.
"As regards inside Afghanistan, yes, Daesh is getting stronger there, is gaining strength. But still, we feel that it is not purely the Daesh which is there in the Middle East."
He said that the operation would first secure the border near Rajgal Valley and forces would then clear the rest of the area. He said multiple "terrorist" organisations with links to recent attacks in Pakistan had safe havens on the other side of border.
The Rajgal Valley and Khyber Agency are part of the volatile Federally Administered Tribal Areas.
IS controls some territory in Afghanistan and has been seeking to strengthen its presence in Pakistan since 2015 when it carried out its first attack in the country.
At about that time, IS announced the establishment of its Khorasan branch - a historical name for Afghanistan and the surrounding areas.
- Thank you for participating in discussions on The Star, Kenya website. You are welcome to comment and debate issues, however take note that:
- Comments that are abusive; defamatory; obscene; promote or incite violence, terrorism, illegal acts, hate speech, or hatred on the grounds of race, ethnicity, cultural identity, religious belief, disability, gender, identity or sexual orientation, or are otherwise objectionable in the Star’s reasonable discretion shall not be tolerated and will be deleted.
- Comments that contain unwarranted personal abuse will be deleted.
- Strong personal criticism is acceptable if justified by facts and arguments.
- Deviation from points of discussion may lead to deletion of comments.
- Failure to adhere to this policy and guidelines may lead to blocking of offending users. Our moderator’s decision to block offending users is final.