Three suicide bombers tried to attack the Indian consulate in an eastern Afghan city on Saturday, sparking a shootout with guards on a bustling downtown street that left at least nine civilians dead, official said.

The attack, which ended when the militants detonated a car bomb that left charred debris scattered in central Jalalabad near the Pakistan border, did not appear to damage the consulate, and Indian officials said all of the facility’s staff escaped unharmed.

The Taliban denied responsibility for the attack, and suspicion instead fell upon Pakistan-based terrorist groups that have been blamed for deadly violence against Indian interests in Afghanistan in the past.

The bombing comes at a time when Afghanistan and India are both trying to patch up relations with Pakistan. Islamabad considers Afghanistan its strategic backyard, and has always viewed India — with which it has fought several wars in the past 65 years — as a rival here.

Afghan President Hamid Karzai, who has blamed Pakistani influence over the Taliban for much of the violence in his country, only last week announced plans to travel to Islamabad.

The two nations have had tense ties for years, and Afghanistan has accused Pakistan in the past of supporting the Taliban in the movement’s fight against the Afghan government. But the election two months ago of a new prime minister in Pakistan had raised hopes in Kabul that Islamabad will be more open to helping start peace talks with the Taliban than the previous government — which it perceived to be more hostile to Afghanistan.

Pakistan is seen as a key player in the Afghan peace process, and the U.S. has been trying to enlist its support to help coax the Taliban into talks. Islamabad has ties to the Taliban that date back to the 1990s, and many of the group’s leaders are believed to be detained or living on Pakistani territory.

Saturday’s attack began when two men wearing explosive vests got out of a car as it approached a checkpoint outside the consulate, prompting a police guard to immediately open fire on them, said Masum Khan Hashimi, the deputy police chief for Nangarhar province. As the two sides exchanged fire, a third militant still in the car detonated a large bomb inside the vehicle.

The blast killed nine bystanders and wounded another 24 people, including a policeman. Six of the dead and three of the wounded were children studying the Quran inside a nearby mosque, according to police and Jalalabad hospital director Dr. Humayun Zahir. All three attackers also died, although it was not clear how many were killed by police fire and how many by the explosion.

There was no indication that Saturday’s attack was linked to U.S. warnings of an al-Qaida threat that has prompted Washington to close its embassies in the Muslim world for the weekend.

The Afghan Taliban denied in a text message that it had carried out the attack. While some Taliban claims have proven spurious in the past, suspicion in Saturday’s assault fell to Pakistan-based militant groups — because of the target as well as the location. Such groups have blamed for past violence against Indians in Afghanistan, including two attacks on the embassy in Kabul in 2008 and 2009 that killed 75 people.

Groups known for targeting Indian interests include Lashkar-e-Taiba, which was blamed for the 2008 attack on the Indian city of Mumbai that killed 166 people, and the Haqqani network which is based in Pakistan’s lawless tribal areas along the border with Afghanistan.

LeT has been active in Afghanistan in recent years, often teaming up with insurgent groups operating in the eastern part of the country near the frontier with Pakistan. In 2010, two Kabul guest houses popular among Indians were attacked, killing more than six Indians. India blamed that attack on LeT.

Last year the U.S.-led military coalition arrested a senior LeT leader in eastern Afghanistan.

The Pakistan-based Haqqani network is affiliated with both al-Qaida and the Taliban, and it has been blamed for attacking Indian reconstruction projects and the Indian Embassy in Kabul. Both LeT and the Haqqanis have in the past been accused of having ties with the Pakistani security establishment. Although Haqqani leaders have pledged allegiance to Taliban leader Mullah Omar, the group largely operates independently.

Both groups have been named as terrorist organizations by the United States