Gunmen opened fire on an army camp near Islamabad, killing eight security personnel and wounding five others,
the military said.
The attack happened on Monday near the industrial city of Wazirabad, less than 150km southeast of the capital.
"At least seven security personnel, including a police official, embraced shahadat [martyrdom] and five others were injured due to firing by unknown assailants near Wazirabad," the military said in a statement.
A rescue party had camped by the Chenab to look for the body of a pilot missing in a helicopter crash in May, the statement said, and the camp came under attack from a bridge.
"The exact number of attackers is not known but they came by motorbike and sprayed bullets on the troops from the bridge," a senior security official told the AFP news agency on condition of anonymity.
"It is highly likely that the attackers belonged to a banned religious outfit, which is a hand in glove with Taliban."
The official added: "Nobody has so far claimed responsibility of the attack but if we follow the pattern of the attack, it looks similar to assaults that these outfits have been carrying out in different cities."
A police chief in the eastern city of Gujrat, where the attack occurred, said they were searching for the culprits and it was unclear if any Islamist protesters were involved.
The police chief was referring to the Difah-e-Pakistan, or Defence of Pakistan, protest movement, which finished delivering speeches inside the city a little less than an hour before the camp was attacked.
The group, which includes hardline Islamist politicians and religious leaders, left the city of Lahore on Sunday along with 8,000 supporters in 200 vehicles to make the 300-kilometre (185-mile) journey to Islamabad.
They group spent the night in Gujrat and plan to hold a protest in front of parliament in the capital on Monday.