Armed residents repelled an attempt by Taliban militants to expand their reach in Pakistan's Swat Valley as foreign aid for refugees fleeing an army offensive in the northwestern region passed $200 million, officials said.

The attempted infiltration in Kalam indicated insurgents are feeling pinched by an army offensive and are seeking new shelter, while the local resistance suggested growing public confidence in an anti-Taliban operation supported by the United States.

Fifty Taliban fighters tried to enter Kalam, but that residents gathered quickly Wednesday to fight them off, Deputy Mayor Shamshad Haqqai told The Associated Press. Residents of Kalam captured eight militants during a shootout and were expecting another attack, Haqqai said.

"We will not allow Taliban to come here," he said. Kalam, a town in the far north of the valley, has about 50,000 residents and has so far remained beyond Taliban control.

Washington has stepped up its pressure on Islamabad to eliminate Al Qaeda and Taliban sanctuaries across its northwestern regions bordering Afghanistan.

Pakistani troops launched the latest offensive last month after Swat militants pushed into adjacent Buner district, bringing them within 60 miles of the capital.

The army claims it has killed more than 1,000 militants and won back swaths of territory in Swat, a valley whose scenery once drew hordes of tourists. But it faces stiff resistance and has ventured no prediction of when the Taliban will be defeated.

On Thursday, it said five soldiers and an unspecified number of "miscreants-terrorists" were killed in battles in several parts of the valley during the previous 24 hours. Seven militants were captured, a military statement said.

The army's account was impossible to verify because reporters have little access to the war zone.

Authorities say the clashes have prompted about 1.9 million people to flee their homes, creating a humanitarian crisis that could sap Pakistani enthusiasm for the effort if it drags on or spreads to other areas.

Relatives have taken in most of those driven out of Swat, and officials have already declared some parts of Buner safe for refugees to return, despite continued clashes in the district.

However, Rear Adm. Michael A. LeFever, the top U.S. military official at the U.S. Embassy in Islamabad, forecast Wednesday that between 200,000 and 250,000 will be living in refugee camps through the end of the year.

Many thousands more are believed to be hunkered down in their homes in areas including Kalam, unwilling or unable to move.

U.S. officials are scrambling to help the pro-Western government manage the refugee crisis and encourage it to sustain and expand its military action.

Hina Rabbani Khar, a government official overseeing the relief effort, said Thursday that foreign donors had pledged $224 million to help the displaced. The total includes $110 million pledged Tuesday by the United States.

As part of the American support, two U.S. military planes delivered air-conditioned tents and 120,000 pre-packed meals to an air base near the capital on Wednesday. Another flight was due Thursday.

At a donors' conference Thursday in Islamabad, Prime Minister Yousuf Raza Gilani asked aid groups and other countries to help quickly rebuild affected areas and help stabilize his nuclear-armed country.

"There is an urgent need for joint and comprehensive response to this issue by all those who are committed to fighting terrorism," Gilani said. "Without peace there can be no sustainable development and without development the establishment of enduring peace is impossible."