ISLAMABAD — 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 Sunday, 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 pro-government religious leaders endorsed the operation but condemned U.S. missile strikes in the northwest.

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

Washington has pressed Islamabad to crack down on al-Qaida and Taliban strongholds along the Afghan frontier, saying the militants threaten not only U.S. and NATO troops in Afghanistan but also nuclear-armed Pakistan’s future. But many in Pakistan believe the militancy here has metastasized because of U.S. intervention in Afghanistan.

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

In giving the 1,000-plus death toll Sunday, 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 over the past three weeks are now too dangerous for journalists to freely visit.

In a statement Sunday afternoon, 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 holed up, 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 remote Piochar area, the rear base of Swat Taliban leader Maulana Fazlullah, it added.

“The operation is going in the right direction as we had planned,” Malik said in a televised news conference from Mardan, where he went to 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 again longtime rival India on the plains of the Punjab region using tanks and artillery, and it has limited experience battling guerrillas in urban settings.

Complicating the fight is the widespread belief that Pakistani intelligence has offered a degree of support to the Taliban in Afghanistan.

“They’re maintaining contact with these groups, in my view as a strategic hedge,” U.S. Defense Secretary Robert Gates said in an interview with “60 minutes” broadcast on Sunday. “They are not sure who’s going to win in Afghanistan. They’re not sure what’s going to happen along that border area. So, to a certain extent, they play both sides.”

Its most recent major offensive, in the Bajur tribal region, drew praise from U.S. officials for dismantling a virtual Taliban mini-state 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 criticized the U.S. 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.

Most Pakistanis are relatively moderate Muslims, and many subscribe to Sufi-influenced traditions. However, hard-line versions of Islam have a significant following here, though the Taliban’s approach is unusually extreme.

U.S. officials say the missile strikes are a critical tool in killing top militants. Pakistan has protested them, though many analysts believe the two countries have a secret deal allowing the attacks.

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, with South Waziristan serving as the primary base for Pakistani Taliban chief Baitullah Mehsud.

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

“Swat is just the start. It’s a larger war to fight,” the newspaper quoted Zardari as saying in an interview.

In Pakistan’s southern city of Karachi, meanwhile, police said a tip off led them to arrest four alleged militants of Lashkar-e-Jhangvi, a banned outfit linked to both the Taliban and al-Qaida. The men are suspected of planning attacks on high-value targets in Karachi, senior police officer Chaudhry Mohammad Aslam said.

Around 5:35 p.m., CHP officers responded to a report of the incident in westbound I-580 lanes at Main Street. En route, officers learned a vehicle's driver said a person in another vehicle brandished a handgun and fired a shot.

In addition to evacuating 10 neighboring homes, deputies restricted pedestrian and vehicle traffic in the area while the sheriff's office bomb squad "safely disposed" of the explosives, officials said.