Pakistan's military launched airstrikes on five militant hideouts in a troubled tribal region near the border with Afghanistan on Wednesday, killing 40 suspected fighters as part of a massive operation that began this summer.

In a statement, the military said "precise" air strikes were carried out in Datta Khel, a Taliban stronghold in North Waziristan, where Pakistan launched a long-awaited offensive on June 15. The region has long been home to local and foreign militants who carry out attacks in Pakistan and against NATO forces in Afghanistan.

The military said it also destroyed ammunition depots, and those killed included "foreigners."

It gave no details about the identity and nationality of those killed in the strikes, but authorities in Pakistan usually use the term "foreign militants" to refer to Arabs, Uzbeks and Al Qaeda fighters. Since launching the operation, the military says it has killed more than 1,000 local and foreign militants, while it lost more than 80 soldiers.

Pakistan is a key ally of the United States, but the country also is home to the Pakistani Taliban and Al Qaeda, both of which have used North Waziristan as a base for carrying out attacks in neighboring Afghanistan for years. Pakistan and Afghanistan share a porous border, which is used by militants from both sides to use the neighboring country's soil as a safe haven.

The latest military strikes came a day after a group of militants in Afghanistan attacked a Pakistani border post, leading to a fight that killed 11 insurgents and four soldiers.

On Wednesday, Pakistan's foreign ministry said it had lodged protest with Kabul over Tuesday's cross-border attack.

In a statement, it said about 100 insurgents had sneaked into Pakistan "from recently established sanctuaries" across the border but the attack was repulsed by Pakistan forces. It added that the bodies of three militants were left behind and four Pakistan soldiers were killed in the attack.

It did not explain whether the attack involved Afghan or Pakistani Taliban.

Pakistan and its military claim that Mullah Fazlullah, the head of Tehreek-e-Taliban Pakistan, has been hiding in Afghanistan.

The Pakistani Taliban is a loose network of local militant groups who want to overthrow the country's government in a bid to install their own harsh brand of Islamic law. They have killed thousands of civilians and security forces in their decade-old campaign of deadly bombings, shootings and other attacks.

After coming into power last year Prime Minister Nawaz Sharif tried to resolve the issue through talks. But after Uzbek militants with the support of Pakistani Taliban attacked the country's main airport in the southern port city of Karachi, killing 26 people, he approved the military operation.

Since then, top militant leaders and their fighters have been on the run and the military's powerful Gen. Raheel Sharif has said the country's security forces would hunt down the militants even in remote areas. The military has said it has cleared almost all major towns and villages of militants and about 80 percent of North Waziristan was now under its control.

The operation displaced over 800,000 residents who were currently living either with relatives or at relief camps miles away from their homes.