Peshawar, Pakistan: Three Pakistani soldiers were killed in an ambush in the northwestern city of Peshawar on Sunday, militants said, in an attack for which both Daesh and a Pakistani Taliban faction claimed responsibility.

Militants said they ambushed an unmarked vehicle ferrying soldiers on Sunday morning near the congested Daudzai area of Peshawar. Military sources confirmed the attack but said the killed men were army employees and not soldiers.

The Pakistan army often uses unmarked vehicles for transportation of soldiers and other employees in volatile areas around Peshawar to avoid being identified and attacked.

“They were travelling in a civil van when unknown armed men opened fire at them,” said a security official who declined to be named. “Three of them died on the spot.” Pakistan’s military this month declared that it had foiled Daesh’s attempts to establish operations in the country.

But the group’s Amaq news agency said Daesh was behind the ambush, also claimed by Jamaat-ur-Ahrar, an offshoot of the Islamist militant Pakistani Taliban group.

Jamaat-ur-Ahrar, which carried out the Easter Sunday bombing in Lahore, in which 70 people were killed, at one time swore fealty to Daesh’s Middle East leadership, but later switched back to the Taliban.

The two groups also both claimed responsibility for a suicide bombing at a hospital in the Pakistani city of Quetta that killed 74 people last month.

Pakistan’s military said on September 1 it had arrested more than 300 of the terrorist group’s militants and sympathisers, thwarting the ultra-hardline group’s attempts to expand there.

But concern has been growing that Daesh — which controls parts of Iraq and Syria and is known for especially brutal treatment of religious minorities — might replicate their model in Pakistan, especially after the group’s loyalists seized small pieces of territory in neighbouring Afghanistan.

On Friday, Pakistani authorities said they arrested four Daesh militants plotting attacks in the city of Lahore.

The four men had 1.6kg of explosives as well as fuses and detonators, officials said.

Most Daesh recruits in the region are believed to be Pakistani or Afghan defectors from other Islamist movements.

Pakistan is home to several militant groups including the Afghan and Pakistani Taliban, Al Qaida and the Haqqani network, giving Daesh both a rich pool of potential recruits but also fierce competition.

Daesh last year declared Afghanistan and Pakistan as the state of “Khorasan”, part of its self-declared global caliphate, and appointed long-time militant Hafiz Saeed Khan as its regional leader.

A US drone strike killed Khan last month in eastern Afghanistan.