Helicopter gunships fired on pro-Taliban tribesmen who clashed with security forces Saturday near the Afghan border, leaving at least 49 people dead, in the aftermath of a military strike on a suspected militant hide-out.

Maj. Gen. Shaukat Sultan, the army spokesman, said 25 militants were killed in Miran Shah and 21 in Mir Ali, but he added the toll could be higher than that. Three security forces also died and about 10 were wounded, he said.

Intercepts of radio communications between militants involved in the fighting in the towns of Miran Shah and Mir Ali in North Waziristan tribal region suggested 80 or more fighters had died, security and intelligence officials said on condition of anonymity because they weren't authorized to comment to media.

The violence came as President Bush visited the capital, Islamabad, about 190 miles to the northeast, and voiced solidarity with Pakistan's President Gen. Pervez Musharraf in fighting terrorism.

Pakistan has deployed about 80,000 forces along the Afghan frontier, but has failed to assert the government's control in the tribal regions that have resisted outside influence for centuries.

Waziristan is known as a hotbed of Al Qaeda and Taliban militants who draw support from the local Pashtun tribal people. Many of the rebellious tribesmen involved in Saturday's unrest were believed to be Islamic students who are sympathetic with the hard-line Taliban militia.

Anger has been stirring among the tribesmen since Pakistan's army attacked a suspected Al Qaeda camp earlier this week in the village of Saidgi near the Afghan border, about 10 miles from Miran Shah. Military officials said 45 people, including foreign militants, were killed in the attack by helicopter gunships and ground forces, but the tribesmen claim local people died.

The fighting began Saturday in Mir Ali, a town near Miran Shah, when tribesmen opened fire on vehicles carrying paramilitary rangers, an army officer said, speaking on condition of anonymity because he was not authorized to speak to media about it.

Sultan, the army spokesman, said the tribesmen were led by a local cleric Maulvi Abdul Khaliq — who this week called for a jihad, or holy war, against Pakistan's army.

The tribesmen used rockets and other weapons to target security forces who responded against militant positions when the munitions started landing near homes and shops. "We acted swiftly to avoid civilian losses ... We are exercising maximum restraint," Sultan said.

Earlier Saturday, Khaliq demanded that authorities stop killing "innocent" people and only carry out operations against militants in coordination with locals.

He urged local elders and lawmakers not to visit the office of the region's top administrator to protest the Saidgi operation. The boycott was announced from loudspeakers mounted on pickup trucks and mosques in Miran Shah.

Bazaars and government offices closed after the announcement, and 500 families left the town, fearing a showdown between security forces and the armed tribesmen, who are mainly students from Islamic schools, a local intelligence official said.

Another official, who also declined to be named because of a lack of authorization, said many families were leaving in haste, without packing many belongings.