Security forces rescued dozens of students, teachers and staff from a boys school who had been taken captive by militants in the North Waziristan tribal region, the army spokesman said on Tuesday. The rescue apparently ended a brief kidnapping saga that further rattled the country.

Maj. Gen. Athar Abbas said 80 people, 71 of them students, were found by forces when their convoy, escorted by militants, passed through a checkpoint headed toward South Waziristan tribal region bordering Afghanistan.

The region is a major al-Qaida and Taliban stronghold from which militants are thought to launch attacks inside Afghanistan as well.

"Everyone is safe and sound," Abbas said, adding that there was an exchange of fire.

Details about the kidnapping are murky, with reports on the number of victims ranging from dozens to more than 500.

Police official Meer Sardar said the abduction occurred about 20 miles from Razmak Cadet College. The convoy carrying students, teachers and staff was stopped by a large group of gunmen in their own vehicles.

Cadet colleges in Pakistan are usually run by retired military officers and educate teenagers.

The Waziristans lie roughly 150 to 200 miles from the Swat Valley. South Waziristan is the main base for Pakistani Taliban chief Baitullah Mehsud.

Recent clashes have fueled speculation the military may widen its Swat offensive to South Waziristan, though the army says troops in South Waziristan are merely reacting to attacks.

Journalists have limited access to the tribal belt and Swat, making it difficult to independently verify information from the Pakistani military or other sources.