The Indian consulate in the northern Afghan city of Mazar-i-Sharif came under attack by unknown gunmen, the spokesman of the local governor said.
Twin explosions and shots were heard earlier as the gunmen launched an attack from a nearby house after darkness fell, Muneer Ahmad Farhad, a spokesman for the Balkh province governor said.
They were repelled after an attempt to enter the consulate and took refuge in a house across the street, he said.
"Right now our security forces are fighting them," he said.
An Indian consulate official told AFP by telephone from inside the diplomatic mission that all the consulate's officials are safe, though no immediate information is available regarding casualties or damage. At least one civilian was wounded.
Vikas Swarup, a spokesman for India's ministry of external affairs, told AFP that no Indian casualties have been reported for now.
No militant group has claimed responsibility for the attack yet.
The attack came just days after Indian Prime Minister Narenda Modi went on a historic visit to Kabul as well as India's rival Pakistan.
This was not the first attack on an Indian diplomatic mission in Afghanistan. Previously nine civilians were killed in August 2013 in a suicide attack that targeted the Indian consulate in the city of Jalalabad.