ISLAMABAD - Militants used mortars, rockets and an anti-aircraft gun to attack military positions in northwestern Pakistan on Monday and were pummelled in response by airstrikes that killed at least 25 people, officials said.

It was the latest violence to break out in the tribal region on the Afghan border ahead of a major military offensive against Pakistani Taliban leader Baitullah Mehsud, who is accused of ordering a campaign of suicide attacks as part of an insurgency to destabilize the government.

Spokesman Maj. Gen. Athar Abbas on Monday offered the most detailed information yet about the military's goals for the operation against Mehsud in South Waziristan, which is also a potential hiding place of al Qaeda and Afghan Taliban leaders.

"Our effort is to break his network, the classes and training schools for suicide bombers running there," Abbas told reporters. "To dismantle that ... and particularly the foreigners, who are in big numbers with him."

The government announced last week that the military would go after Mehsud in his stronghold in the remote mountainous region, where heavily armed tribesmen hold sway. The military also has been encouraging tribal leaders and other Taliban factions to rebel against Mehsud.

The operation comes on the heels of the military's offensive against the Taliban in the northwestern Swat Valley region, which is now winding down.

Washington supports anti-militant operations, seeing them as a measure of nuclear-armed Pakistan's resolve in taking on a growing insurgency. The battle in the tribal region could also help the war in Afghanistan because the area has been used by militants to launch cross-border attacks on coalition troops there.

Daily bombing runs and artillery barrages have been softening up militant targets for about a week, and Abbas said the "pre-positioning" of ground troops in South Waziristan has been completed, though the campaign proper has not started.

Overnight Sunday, militants used mortars, rockets and even an anti-aircraft gun to attack three military bases in South and North Waziristan, five intelligence officials said, speaking on condition of anonymity because they are not authorized to talk with media. Their reports could not be confirmed because of a lack of access to the conflict zones.

The intelligence officials said security forces responded with artillery and airstrikes against militant targets in at least seven villages, including a suspected training camp where 19 people were killed.

Three women and three children died when the house of a local tribal leader was hit in the Razmak area, one official said.

The military is trying to avoid civilian casualties, worried about a public backlash at a time when support for a crackdown on extremism has been gathering strength.

Qari Hussain, a close aide of Mehsud, telephoned The Associated Press on Monday to say the military strikes had not weakened the Taliban in South Waziristan and had hit civilians and destroyed their homes.

"With the grace of God we all are safe and no damage has been caused to Taliban ranks, but innocent women, children and men are being killed in the aerial bombing and shelling by the army," Hussain said.

There was no way to verify the claims.

In other violence in the northwest on Monday, three civilians were killed when militants fired a rocket in Bannu district on the North Waziristan border, said police official Tajammal Shah. And two schools were blown up near Peshawar, and Khar in the Bajur area. No injuries were reported.

Elsewhere, a suicide bomber rammed an explosives-laden vehicle into a police checkpoint in the Batgram district bordering Swat, killing two people, and wounding four, police official Shad Mohammad Khan said.

Abbas said almost 1,600 militants have been killed in the two-month-old offensive in Swat, and more than 100 troops have died.

He said the military was checking reports that Swat Taliban leader Maulana Fazlullah and other militant commanders had been injured.

"We need evidence," Abbas said. "A consistent targeting is being done of the main leadership. There have been reports that they are seriously wounded, that some of them have been killed and quietly buried."

Most Pakistanis oppose extremism, but the Taliban have gained influence in several areas in recent years, including Swat and the tribal regions.

Public support for the army offensive could erode if the government is perceived to have failed more than 2 million people displaced by the fighting. The first refugees are expected to start going home at the end of the week.