ISLAMABAD - Pakistani soldiers Tuesday rescued scores of students and staff from a military-run college who were abducted by Taliban militants in the northwest of the country, a military spokesman said.

The abduction took place Monday as the Pakistani army pressed on with an offensive against the Taliban in the Swat valley, in another part of the northwest.

Separately, a high court ordered the release of Hafiz Mohammad Saeed, the founder of an outlawed militant group which was accused of organising an assault on the Indian city of Mumbai in November, his lawyer said.

India, which urged nuclear-armed rival Pakistan dismantle the infrastructure of terrorism after the Mumbai attacks killed 166 people, said it was unhappy with Saeed's release.

It is also likely to dismay the United States which has been alarmed by deteriorating security in an ally whose help it needs to defeat al Qaeda and subdue the Taliban in Afghanistan.

Military spokesman Major-General Athar Abbas said the Taliban were taking the kidnapped students to the South Waziristan region, a militant stronghold on the Afghan border, when soldiers challenged them on a road and a clash erupted.

Under cover of the firing the militants escaped and we have recovered them all, Abbas said, adding 71 students and nine members of staff had been rescued.

College principal Javed Iqbal Piracha, who was among those rescued, said 10 to 15 students appeared to be still missing.

Taliban fighters seized the students' convoy heading home for the summer holiday near the Afghan border in North Waziristan.

There are several Taliban- and al-Qaeda-linked groups based in North and South Waziristan in a loose alliance with the Taliban in Swat. South Waziristan is also the base of Pakistani Taliban leader Baitullah Mehsud.

South Waziristan is also the base of Pakistani Taliban leader Baitullah Mehsud and officials have said an offensive there was expected after Swat was secured.

Brigadier Zahid Abdullah, who led the rescue and said he believed everyone had been recovered, said the militants might have wanted to use the students as human shields.

Stock market dealers said investors were encouraged by the rescue of the students but the 100-share index ended 1.18 percent lower at 7,125.11 on worry about taxes being imposed on brokerage services in the new fiscal year.

APPEAL FOR FUNDS

Pakistan launched an offensive against a growing Taliban insurgency in the Swat valley, 120 km (80 miles) northwest of Islamabad, a month ago, sparking a flood of fleeing civilians.

Officials say an estimated 2.4 million people have been displaced by the conflict, prompting U.N. warnings of a humanitarian crisis.

The United Nations appealed for $543 million last week but just over a fifth has been funded. U.N. Secretary-General Ban Ki-moon urged countries to scale up their response.

The United States has welcomed the offensive in Swat but a protracted humanitarian crisis could undermine Pakistani public support for the fight against the Islamist militants.

The military said Tuesday that 21 militants and three soldiers had been killed in Swat in the previous 24 hours, and that life was returning to normal in Mingora, the main town in Swat, which the army cleared of militants on the weekend.

Soldiers were battling militants in other areas to the north of Mingora, the military said.

Saeed, the Islamist ordered released, was put under house arrest in early December after a U.N. Security Council committee added him and a charity he heads to a list of people and organizations linked to al Qaeda or the Taliban.

His lawyer, A.K. Dogar, told reporters the Lahore High Court had ruled his detention illegal.

Saeed founded the Lashkar-e-Taiba (LeT) militant group in 1990 and for years it battled Indian forces in the disputed Kashmir region. The group was banned in Pakistan in 2002.

Saeed heads the Jamaat-ud-Dawa charity, which the United Nations said in December was a front for the LeT.

India says the Mumbai assault was carried out by LeT militants who must have had backing from some Pakistani agencies.

Pakistan has acknowledged the attack was launched and partly planned from Pakistan, and the surviving attacker was Pakistani.

Asked about Saeed's release, Indian Home (interior) Minister Palaniappan Chidambaram said India was unhappy and Pakistan was not serious about investigating the Mumbai attack.

Pakistan has lodged police complaints against eight suspects but Saeed was not among them.

(Additional reporting by Arshad Mohammed in Washington, Bappa Majumdar in New Delhi, Zeeshan Haider, Augustine Anthony; Writing by Robert Birsel)