ISLAMABAD - Pakistani forces cleared a Taliban stronghold in Swat and drove militants out of a town in the northwest valley, the military said on Friday, amid worries over the return of more than 2 million displaced people.

Beaten back by the army in Swat, Islamist militants have retaliated with bomb and gun attacks in Pakistani cities in the last couple of days.

Western allies, worried that the security of Pakistan's nuclear weapons could be compromised by the Taliban threat, were heartened by the decision to unleash the army late last month.

They are anti-state as well as anti-Islam. Therefore, there is no mercy for them, Interior Minister Rehman Malik told ARY OneWorld television news channel.

But, the offensive has sparked an exodus of about 2 million people and any long-term humanitarian crisis could eventually undermine public support for the fight against the Taliban.

Military spokesman Major-General Athar Abbas told state-run television that more than 1,200 militants had been killed and 42 captured since the conflict broke out after the militants moved south from Swat into Buner, a valley just 100 km (60 miles) from Islamabad.

Abbas said 90 soldiers had been killed and 60 wounded. There were no independent casualty estimates available.

Abbas foresaw the militants breaking cover as they ran out of ammunition and supplies.

Once it's done completely then we'll be able to overpower them, as they'll be strapped of ammunition and they'll come up, he said.

In a bid to take the heat off retreating comrades in Swat, militants have carried out eight bomb attacks in towns and cities since late April, three on Thursday in the northwest, a day after 24 people were killed in a suicide gun and bomb attack in the eastern city of Lahore.

The United Nations issued a security warning to its staff in Islamabad to stay home on Friday and there were calls for more support to help Pakistan cope with the burgeoning humanitarian crisis.

Under-Secretary General for Humanitarian Affairs John Holmes said that an appeal launched a week ago for $543 million was only 21 per cent funded.

Around 90 percent of the people who have fled Swat and Buner have been provided shelter by families outside the conflict zone, and aid workers fear the burden will become to great for the host communities' meager resources.

Without urgent assistance there is a real fear that impoverished host communities could contribute to another wave of internal displacement, said Graham Strong, World Vision's Country Director in Pakistan.

SQUEEZING MILITANTS NORTHWARDS

The military had sealed off most routes into Swat, choking off supplies and reinforcements for the militants, and the offensive had already targeted the militant's logistics bases.

Abbas said militants were fleeing north over the mountains into Kalam valley, where troops were being deployed to meet them.

During the past 24 hours a cordon-and-search operation had finally cleared Peochar village of militants, according to a military statement. Helicopters had dropped commandos into Peochar more than two weeks ago.

Lying in a forested alpine valley, Peochar was one of the main bases for various militant groups that had used Swat as a half-way base between Pakistan's borders with eastern Afghanistan and Indian Kashmir.

The search operation destroyed militant hideouts, including a madrasa, or religious school, and recovered 12 stolen United Nations' vehicles. Troops also uncovered a network of tunnels and found a huge arms cache including 12.7 mm guns.

The military statement also said troops had secured Bahrain, a town in upper Swat, and killed nine militants.

The army says troops have almost secured Mingora, the main town in Swat with a population of 300,000 before most of the inhabitants fled.

There were still clashes as troops searched buildings in and around Mingora. Militants ambushed a convoy ferrying rations to people who had stayed behind, and four soldiers were killed.

In Daggar, the main town in Buner, which was re-taken last month, troops killed 13 militants hiding in a walled compound.