World Bulletin/News Desk
The attack in Rawalpindi, next to the capital, Islamabad, came days after the Pakistani Taliban split into two groups, limiting the government's chances of finding a negotiated settlement to end the fighting.
"A security forces vehicle was targeted, likely by a suicide bomber near Ternol, Rawalpindi," the source said. "Two officers were martyred and three civilians were killed."
The source identified the officers as lieutenant colonels.
Meanwhile, suspected Taliban fighters attacked Pakistani outposts from positions on the Afghan side of the border, killing four soldiers, Pakistani military officials said on Wednesday.
One military source said four soldiers were also wounded.
The assault, which took place in Pakistan's Bajaur tribal region, comes after Afghan officials said an air strike by Pakistani forces killed four civilians on Saturday.
"In Bajaur region during the early morning today, terrorists from across the border fired on Pakistani border posts," said the military source. "Four soldiers were martyred and four are injured.
"This is the third incident of cross-border attacks and firing since May 25 from Afghanistan," the source added.
The Pakistani foreign office condemned the attack and said it had raised the issue with the Afghan government in Kabul and with the country's embassy in Islamabad.
"Afghanistan must take concrete steps to stop the use of its territory against Pakistan," said the statement.
Pakistan launched its first major ground offensive in years against fighters near the Afghan border on May 22 after several rounds of government-led peace talks ended in failure.
Afghanistan says hundreds of rockets and bombs have landed in Afghan villages close to the border since the offensive began 11 days ago.
Last month, Pakistan lodged a formal complaint with Afghanistan after a military post in Bajaur came under heavy attack from suspected Taliban fighters, killing one soldier.