Army surveillance planes flew Wednesday over suspected militant strongholds in Pakistan's northwestern tribal district where a major offensive is planned, and helicopter gunships hit several targets in advance strikes, officials said.

More residents of South Waziristan fled the region, joining tens of thousands who have left in recent weeks as sporadic fighting between militants and the military has increased and expectations have risen that a major battle is imminent.

The military confirmed Tuesday it was preparing an operation to go after Pakistani Taliban leader Baitullah Mehsud in South Waziristan, a chunk of the rugged and lawless tribal zone along the Afghan border where al-Qaida and Taliban leaders have become entrenched.

But officials insisted the offensive was still in the planning stages and that recent strikes on militant targets in South Waziristan and neighboring Bannu were in response to militant attacks and not the launch of the campaign.

The highly anticipated military operation is seen as a potential turning point in the yearslong and sometimes halfhearted fight against militancy in Pakistan. It could also help curb Taliban attacks on Western forces in neighboring Afghanistan.

But the offensive in the tribal region will also be the toughest yet for Pakistan's military, testing both its fighting capability and the government's will to see it through.

Three security and intelligence officials told The Associated Press on Wednesday that the military had almost completed deploying troops to strategically important areas for the upcoming operation.

Planes flew over parts of the area taking videos, the officials said. Attack helicopters and artillery were also used to hit suspected militant hide-outs, they said, the latest in more than a week of strikes.

The officials spoke on condition of anonymity because they were not authorized to talk to the media.

Pakistan's army commanders were also in touch with their Afghan and U.S. counterparts in Afghanistan to seek help in stopping any possible militant movement along the Afghan border, the officials said.

The border is ill-defined in the semiautonomous tribal region, and militants have moved freely between Pakistan and Afghanistan in the past. Al-Qaida leader Osama bin Laden and others are believed to have taken shelter there after U.S.-backed forces ousted the hard-line Taliban regime in 2001.

The region is remote and unsafe for journalists and other outsiders, and independent accounts of activity there could not be verified.

Concern about the porous border is twofold: militants could flee the Waziristan offensive into Afghanistan, or fighters from Afghanistan could flood in to combat Pakistani forces.

The buildup in Waziristan comes as the army enters the final stages of a major operation against the Taliban in the Swat Valley region that has triggered a wave of retaliatory suicide bombings across Pakistan.

The military said Wednesday it had killed 22 militants in Swat in the past day, including a local commander. It said some 300 families had returned to the town of Kalam after earlier being displaced by the fighting — a further sign the operation is close to completion.

More than 2 million people were uprooted by the fighting in Swat, an exodus international aid agencies say is threatening to become a humanitarian crisis.

Local government and services have collapsed in many towns in the Swat region, and maintaining security is a rising concern as residents begin moving back home.

Elders in the Kalam and Bahrain areas of Swat have begun organizing local defense committees in cooperation with the army to prevent the militants from coming back, the military said in a statement. Refugees will also be recruited to help rebuild local police forces, senior provincial police chief Malik Naveed Khan told the AP.

The European Union announced Wednesday during a summit with Pakistani President Asif Ali Zardari that it would boost humanitarian aid to Pakistan by $100 million (euro72 million) to help the Swat refugees. The aid comes on top of the $675 million (euro485 million) the European Commission previously pledged to Pakistan for development over the next five years.

Earlier this month, Richard Holbrooke, the U.S. special envoy to Pakistan, singled out Europe when he chastised countries for not giving enough aid to resettle the Swat refugees.