Pakistan Suicide Bomb
Security officials hold weapons as they secure the site of an explosion at the Delhi Colony area, in Karachi  Reuters

A suicide bomber detonated an explosive device next to a military vehicle near the Pakistani capital of Islamabad killing two high-ranking officers and three civilians.

"It happened around 9.30am, the suicide bomber was on foot and detonated his explosives next to a military pickup truck," said Mohammed Altaf, a police official.

The incident took place in the Fateh Jang area of the Attock district in the northern area of the Punjab province, approximately 50km west of Islamabad.

The two officers killed in the attack were Pakistani lieutenant-colonels and their vehicle was not marked with military insignia.

The officers were on their way to work while the civilians happened to be on the same street when the bomber detonated his device.

No group has yet claimed responsibility for the attack but it is likely that the Pakistan Taliban or associated militants were to blame for the attack as they often target the military as part of their insurgency.

While attacks in the tribal regions of Pakistan near the Afghanistan border are common, terror incidents near the capital of Islamabad are much rarer, especially against top officials.

A ceasefire was announced by Pakistan Taliban militants in March but this expired in April after talks with Prime Minister Nawaz Sharif's government reached a deadlock.