Peshawar: Two gunmen on a motorcycle shot dead an intelligence officer in northwest Pakistan on Monday, police said, in an attack claimed by Daesh.

Akbar Ali, an intelligence sub-inspector, was on his way to work and waiting at a bus stop near his home in Charsadda district when the gunmen opened fire, Suhail Khalid, district police chief, told journalists.

“Akbar Ali was hit by four bullets from the front and was killed on the spot,” he said, adding that the attackers used a 9mm pistol and fled the scene.

The attack was later claimed by Daesh in a short statement posted on Amaq, its affiliated news agency.

“Islamic State [Daesh] fighters have killed a Pakistan intelligence agent in the Sardaryab region... of Pakistan,” it said, referring to the local area.

Pakistan’s military last month admitted for the first time that the Daesh group had a presence in the country but said it had detained hundreds of its militants and prevented them from carrying out major attacks.

The army’s spokesman said its forces had foiled planned attacks by Daesh on embassies and Islamabad airport, but denied the group was behind an August attack on a hospital that killed 73, as it had claimed.

Daesh, which has struggled for traction in Pakistan in the face of competition from well-established groups, gained its first toehold in January 2015 when six Pakistani Taliban leaders switched their allegiance from Al Qaida.

An attack on a bus in Karachi in May 2015 that killed 46 people was the first major incident officially claimed by Daesh in Pakistan.

Pakistan has been battling an Islamist insurgency since shortly after it decided to ally with the US following its invasion of Afghanistan in 2001.

Violence has declined in recent years following a series of military offensives in the northwest border areas as well as concerted efforts to block the militants’ sources of funding.

But the remnants of militant groups are still able to carry out periodic bloody attacks, particularly in the northwest.

Separately, gunmen on a motorcyle shot dead two coast guards and a civilian and wounded a shopkeeper in a remote southwest coastal town, local police station chief Chakar Baloch told journalists Monday.

The incident, also confirmed by provincial police chief Ahsan Mahboob, took place late Sunday in Pasni, around 650 kilometres southwest of Quetta, the provincial capital of Balochistan where separatists demanding greater autonomy have been waging an insurgency for years.

A spokesman for the Baloch Liberation Army, Gend Baloch, later claimed responsiblity for the attack in a phone call to journalists.