Afghan security forces inspect a building, used by insurgents to launch an attack on Pakistan's consulate in Jalalabad, capital of Nangarhar province, Afghanistan, Wednesday, Jan. 13, 2016. Several members of the Afghan security forces were killed Wednesday after unidentified gunmen attacked the Pakistani consulate in a volatile eastern province, an official said on Wednesday. (AP Photos/Mohammad Anwar Danishyar)

ISIS claimed responsibility for a suicide attack on the Pakistani consulate in Jalalabad in eastern Afghanistan on Wednesday that was followed by a deadly gun battle lasting several hours.

Afghan officials said all three attackers and at least seven members of the security forces died during the attack by the radical Islamist movement which has so far avoided striking high-profile Pakistani targets.

The attack, which comes amid efforts to restart the stalled peace process with the Taliban and ease diplomatic tensions between India and Pakistan, resembled an assault on the Indian consulate in the northern city of Mazar-i-Sharif last week.

Witnesses in Jalalabad, the main trade gateway to the Khyber Pass and Pakistan, said heavy gunfire and a series of explosions could be heard during the battle and residents and children from a nearby school were evacuated.

Afghanistan

Nangarhar, the province in which Jalalabad is located, has become the main Afghan stronghold of ISIS, which has battled the Taliban for leadership of the Islamist insurgency.

Attaullah Khogyani, a spokesman for the provincial governor, said a suicide bomber had tried to join a queue of people seeking visas to Pakistan and blew himself up after being prevented from entering the building.

ISIS said on its official Telegram messaging service channel that three members wearing suicide-bomb vests carried out the attack, which it said had killed dozens of people including “several Pakistani intelligence officers”.

It said two suicide attackers had been killed while a third escaped.

Pakistan condemned the attack but said all members of the consulate staff were safe, with one official slightly injured by broken glass.

Last week, a group of attackers barricaded themselves in a house and resisted security forces for about 24 hours after a suicide attack on the Indian consulate in Mazar-i-Sharif.

The group responsible for that attack has not been identified but the incident fuelled suspicion in India about militants sponsored from Pakistan and it cast a shadow over the latest effort to improve relations.

Tension between India and Pakistan has risen since the attack on its consulate and on an Indian air base that killed seven Indian military personnel near their border. India has blamed the attacks on Pakistan-based militants.

A rare meeting between the foreign secretaries of both countries had been tentatively scheduled for later this week, but it is unclear if it would still happen after the attacks. A decision is not expected before Wednesday evening, Indian officials said.

Delegates from Afghanistan, Pakistan, China and the United States also met this week to try to resurrect efforts to end nearly 15 years of bloodshed in Afghanistan, even as fighting with the Taliban intensifies.

Pakistan says many Pakistani Taliban militants, who are separate from but allied with the Afghan Taliban, and are fighting to bring down the Pakistani state, have sought refuge in Afghanistan from a Pakistani army offensive.

In Pakistan on Wednesday, at least 14 people were killed in a blast near a polio vaccination centre in the southwestern city of Quetta.