Two Pakistani policemen and a Taliban fighter have been killed in a shootout in the city of Lahore a short distance from the prime minister's family home, police have said.
In a separate incident, six people were killed by a roadside bomb on the outskirts of the northwestern town of Hangu.
The Lahore gun battle lasted several hours and took place just over two kilometres from Prime Minister Nawaz Sharif's private family residence, police said.
Two Taliban fighters holed up in a house used rocket-propelled grenades and machine-guns to battle police outside.
One fighter was killed and the other wounded and captured, said police chief Zulfiqar Hamid. Three policemen were also wounded in the fighting on Thursday morning.
After entering the house, police found explosives and detonators, said another policeman.
The clash in the eastern city came as the army carries out an offensive to clear the Pakistani Taliban from strongholds in North Waziristan on the Afghan border.
On Wednesday, more than 50 people were reported killed in air strikes in North Waziristan.
The military ordered North Waziristan's entire civilian population to leave when announcing the offensive on June 15, and said it would consider all those left behind to be members of armed groups.
The Pakistani Taliban, who are fighting to bring down the state and impose Islamic law, vowed to carry out revenge attacks across the country in response to the offensive.
Near Hangu, in the province of Khyber Pakhtunkhwa, a roadside bomb blew up a bus on Thursday killing six people and wounding five, police said. There was no claim of responsibility.
Pakistan supported armed groups battling Soviet invaders in neighbouring Afghanistan in the 1980s but some fighters turned their guns on the Pakistani state after it was pressed into siding with Washington in its "war on terror" following the September 11, 2001, attacks on the United States.
The bulk of US-led foreign forces are pulling out of Afghanistan this year after nearly 13 years of an inconclusive war with both it and Pakistan struggling to stem increasing violence.