(CNN) -- Four gunmen attempted to attack the Indian consulate in Afghanistan's western Herat province early Friday, a spokesman for the governor's office said.
A member of the Indian Tibetan Border Police (ITBP), who was guarding the consulate in Herat City at the time, fired at the assailants as they attempted to barge into the building, said Deepak Kumar, a spokesman for the ITBP in New Delhi.
The attackers were armed with machine guns and grenades, he said. A car bomb also exploded near the scene but caused no damage.
The attackers were eventually surrounded by Afghan security forces as they approached the consulate, according to Herat governor's spokesman Abdul Rauf Ahmadi.
Two of the gunmen were killed, Ahmadi said. The consulate was not damaged and no one there was injured.
The identity of the attackers or motive for the attack is not yet known.
Meanwhile, India's external affairs spokesman, Syed Akbaruddin, said in post on Twitter that New Delhi was in touch with Kabul and that Indian Foreign Secretary Sujatha Singh was monitoring the situation.
CNN's Masoud Popalzai in Kabul and Harmeet Shah Singh in Delhi contributed to this report.