The Pakistani army entered the last of three militant strongholds targeted by a major offensive in the northwest on Friday, as gunmen wounded a senior army officer and a soldier in the capital.

The operation in South Waziristan, the main Taliban and Al Qaeda sanctuary in Pakistan, has sparked a wave of retaliatory attacks that have killed about 300 civilians and security forces in the past month. The shooting in Islamabad was the third such attack in about two weeks.

The militants hope the attacks will weaken the army's resolve as it pushes deeper into the isolated, mountainous region near the Afghan border. But the army pressed ahead Friday, entering Makeen, the hometown of former Pakistani Taliban leader Baitullah Mehsud, who was killed in a suspected U.S. missile strike in August.

Troops razed Mehsud's house, an act of vengeance for the hundreds of people the Pakistani Taliban has killed in the country.

In Islamabad, assailants opened fire on an army brigadier and a soldier as the two drove away from the officer's home, said police official Khan Khurshid Khan. The gunmen sped away after the attack, he said.

Hospital official Arshad Khokhar said the brigadier and the soldier were in stable condition. A brigadier is equivalent to a brigadier general in the U.S. Army.

It was unclear if the officer was involved in the South Waziristan offensive, which was launched in mid-October.

On Oct. 22, gunmen on a motorcycle shot and killed a brigadier and a soldier riding in an army jeep in what was believed to be the first assassination of an army officer in the capital.

Less than a week later, gunmen attacked another brigadier as he was driving to a bank with his mother, but they escaped unharmed.

No group has claimed responsibility for the attacks, but suspicion fell on the Pakistani Taliban, which has declared war on the government for alleged being un-Islamic and supporting the U.S. war on terror.

The Taliban has claimed responsibility for scores of attacks in Pakistan, many of them carried out by homicide bombers. The recent shootings could indicate the militants are turning to targeted assassinations to stoke even more fear.

Police shot and killed two would-be homicide bombers in northwestern Pakistan on Friday, police official Sajid Ali said. The two men opened fire on police when their car was intercepted at a checkpoint in Balakot, a town in North West Frontier Province.

Authorities returned fire, killing the two men, and found two homicide vests and two bombs in the vehicle, Ali said. Two police were wounded.

The Pakistani army has vowed to continue the South Waziristan offensive despite the increase in militant attacks. It says it is now fighting bloody street-to-street battles in each of the three main militant strongholds in the region — Makeen, Sararogha and Ladha.

The military says hundreds of insurgents have been killed in the South Waziristan operation — including 24 in just the last day — and hundreds more have been wounded.

A Taliban spokesman disputed the army's claims earlier this week, saying the group has not lost even a dozen fighters. The militants say they are intentionally drawing the army farther into the isolated region to trap them as winter approaches.

Details are impossible to confirm since South Waziristan has been sealed off to outsiders since the offensive began. Journalists have only been allowed in on carefully orchestrated government trips.

The Pakistani government has been eager to portray the militants as on their heels. Pakistani intelligence officials on Thursday shared an intercepted speech by the current Pakistani Taliban leader, Hakimullah Mehsud, who warned his fighters they will go to hell if they flee the army offensive.

The authenticity of the speech, which was broadcast over a wireless radio network Tuesday, could not be independently confirmed.