A suicide bomber attacked the Indian consulate in the eastern Afghan capital of Jalalabad on Saturday, Indian officials and local police said, killing six people and wounding 22.
Gunfire resounded through the area for at least an hour following the 10 a.m. blast near the consulate entrance.
All the casualties were civilians, except for one wounded Afghan soldier, said Baz Mohammad, a senior health official in Nangarhar province.
"Explosion in front of India's Consulate in Jalalabad. All Indians officials safe," Indian Ministry of External Affairs spokesman Syed Akbaruddin said on Twitter.
The attack followed a world-wide travel alert issued by the United States on Friday, saying that Al Qaeda could be planning attacks in August, particularly in the Middle East and North Africa. The United States has ordered the closure of 21 embassies and consulates on Sunday, including its Kabul mission.
Nangarhar police chief Mohammad Sharif Amin told Reuters a bomber detonated a car packed with explosives outside the consulate and an adjacent mosque. The consulate was the intended target, he said, but most casualties were from the mosque.
Roads near the Indian consulate remained blocked as gunfire rattled through the area, deputy provincial police chief Masoom Khan Hashimi said.
Indian diplomatic missions have been targets of previous attacks in Afghanistan.
The eastern border province of Nangarhar, and its capital Jalalabad, have long been a hotbed of insurgent activity.
On Friday, a five-hour battle between Afghan security forces and Taliban fighters in the province's Shirzad district killed dozens of Afghan police and insurgents, officials said.