ISLAMABAD, Pakistan - Pakistani security forces fought Taliban militants on the outskirts of the main city in the northwest's Swat Valley and entered two other Taliban-held towns there, the army said yesterday, foreshadowing what could become bloody urban battles.

A top government official said the offensive near Afghanistan had already killed more than 1,000 Taliban fighters, while a group of progovernment religious leaders endorsed the operation but condemned US missile strikes in the northwest.

The developments underscored Pakistan's resolve and frustration in its battle against militancy.

Washington has pressed officials in the capital of Islamabad to crack down on Al Qaeda and Taliban strongholds along the Afghan frontier, saying the militants threaten not only US and NATO troops in Afghanistan but also nuclear-armed Pakistan's future. But many in Pakistan believe the militancy here has metastasized because of US intervention in Afghanistan.

Recent Taliban forays into a district just 60 miles from Islamabad seem to have swayed many Pakistanis to support the most recent military operation, but that could change if the toll on the hundreds of thousands of civilians displaced mounts, and if more US missile strikes stoke greater popular discontent.

In giving the 1,000-plus death toll yesterday, Interior Minister Rehman Malik said the operation in Swat and surrounding areas would "continue till the last Taliban are flushed out." It was not possible to independently verify the figure. The territories bombarded during the past three weeks are now too dangerous for journalists to freely visit.

In a statement yesterday, the army said 25 militants and a soldier died in the previous 24 hours.

Security forces were facing off with militants in "intense fire engagements" on the outskirts of Swat's main town, Mingora, where many of the estimated 4,000 Taliban fighters in the valley are believed to be, the statement said.

It also said security forces had surrounded and entered the towns of Matta and Kanju to take on the militants, and it requested civilians still in those areas stay away from the Taliban hide-outs. Troops were making gains in the remote Piochar area, the rear base of Swat Taliban leader Maulana Fazlullah, it said.

"The operation is going in the right direction as we had planned," Malik said in a televised news conference from Mardan, where he visited relief camps to see some of the new refugees. "I cannot give a time but we will try [to complete the operation] at the earliest."

The military did not detail how many ground troops were involved in the latest advances.

Pakistan's army is geared toward fighting a conventional battle against longtime rival India on the plains of the Punjab region using tanks and artillery, and it has limited experience battling guerrillas in urban settings.

Its most recent major offensive, in the Bajur tribal region, drew praise from US officials for dismantling a virtual Taliban ministate but was criticized for the large amount of destruction it caused. The number of civilians killed in Bajur is unknown.

At a convention in Islamabad, hundreds of religious scholars and leaders - many of them Barelvis, a Sufi-influenced strain of Sunni Islam - denounced suicide attacks and other Taliban tactics in urging the government to continue the operation until peace is restored.

The attendees also denounced the US missile strikes, saying Pakistan should take up the matter at the United Nations.

"Internally, terrorists were attempting to weaken Pakistan by spreading terrorism and killing people and on the other hand drone attacks are on . . . This is a conspiracy against Pakistan and we will foil it," said Sahibzada Fazl Karim, one of the speakers.

The Taliban's ability to overrun Swat, once a premier Pakistani tourist destination, had proved particularly embarrassing to the Pakistani military and the weak civilian government.

Many of the main militant safe havens, however, are in Pakistan's semiautonomous tribal areas.

Britain's Sunday Times reported that Pakistani President Asif Ali Zardari said military action would follow in the tribal belt.

"We're going to go into Waziristan, all these regions, with army operations," the newspaper quoted Zardari as saying in an interview. "Swat is just the start. It's a larger war to fight."