Afghan security forces shot down four suicide bombers who targeted the Indian consulate in the eastern city of Jalalabad, in a gun battle in which at least two people were killed and 19 others were wounded, reports said.
The violence, coming days after similar attacks in capital Kabul and the eastern province of Kunar, which left dozens of people dead or wounded, raises doubts over efforts to revive a stalled peace process with the Taliban.
In the present case, the car bomb driven by the attackers detonated near the Indian consulate, shattering doors and windows and destroying at least eight cars as explosions and gunfire rocked the area, witnesses said.
Security forces in armoured vehicles reached the scene in time, while civilians fled. This helped forces to deal with the attackers before they could enter the consulate compound, said Attahullah Khugyani, a spokesman for the governor of Nangarhar province.
The area houses other foreign consulates, including that of Pakistan.
"Their target was the Indian consulate, but our forces shot and killed them all before they reached their target," he said.
India's ministry of external affairs (MEA) has confirmed that it was a suicide explosion, which targeted the Indian consulate.
However, all Indian consulate officials are safe, the MEA said.
MEA is also gathering more information regarding the blasts.
The ITBP and Afghanistan security forces are currently engaged in a fierce gunbattle with terrorists who are believed to be hiding in a nearby building.
However, two people, a police officer and a woman, were killed and 19 others were wounded, he added.
No one claimed responsibility for the attack, which followed a similar attack on the nearby Pakistani consulate in January.
The Islamic State, which has a growing presence in Nangarhar, the province had claimed responsibility for that attack.
Early in January, the Indian consulate in Afghanistan's Mazar-i-Sharif city was also attacked. Afghan Police had reportedly blamed Pakistan military personnel for that attack.