KHAWAZAKHELA, Pakistan  A top Pakistani general said Friday that the military had succeeded in clearing two militant strongholds in upper parts of the contested Swat Valley, including this city, and was just a week away from taking over a third.

“Essentially, at this point in time, we are looking at eliminating the hard-core militants,” Maj. Gen. Sajjad Ghani, the commanding officer of the military operation in the upper part of Swat, said in a briefing for journalists here. Khawazakhela is one of the largest cities in Swat, with a population estimated at more than 500,000.

It has been difficult to verify the accounts of the Pakistani military, since roads leading to the heart of the fighting have been blocked. On Friday, the military allowed a small group of journalists limited access to the area.

Rahimullah Shaheen, a local journalist, sounded a note of caution, saying that the Taliban who had been forced out of Khawazakhela had simply retreated into the nearby mountains, just a few miles from the city. One local commander, Shah Doran, still broadcasts on an FM frequency that can be heard in the valley between 9 and 11 p.m.