The Indian consulate in Herat in Afghanistan was attacked on Friday by four heavily armed gunmen who tried to enter the complex. All four attackers were killed, officials said, adding that the Consulate staff were safe.

The attack began at 3.15 a.m. when the four gunmen tried to break into the consulate, located 600 km from Kabul. Earlier reports had indicated the involvement of three gunmen.

The audacious attack comes ahead of the May 26 swearing-in ceremony of Narendra Modi as India’s next prime minister. Afghan President Hamid Karzai has confirmed that he will attend the oath-taking ceremony.

Modi tweeted: “I condemn the attack on our consulate in Herat, Afghanistan. Closely monitoring the situation. I have spoken to the Ambassador as well.”

Syed Akbaruddin, External Affairs Ministry spokesperson, told IANS in New Delhi: “All the staff of the Indian consulate are safe.”

“The attempt was thwarted by the staff of the (ITBP) Indo-Tibetan Border Police, who were joined by the Afghan security forces,” said Mr. Akbaruddin providing the latest update on the situation.

He said that Mr. Modi had spoken with Indian Ambassador Amar Sinha and bolstered the morale of the Indian staff there.

Indian Foreign Secretary Sujatha Singh is monitoring the situation and is in touch with her counterpart in Afghanistan, said Mr. Akbaruddin.

Mr. Akbaruddin tweeted: “Firing continuing. Situation remains uncertain. But staff at our consulate safe. India monitoring situation.”

“We are glad to tell that all Indian personnel remain safe. We have rechecked that while the situation remains uncertain, there is no threat to the Indian staff,” he added.

Shaida M. Abdali, the Afghan Ambassador to India, told TIMES NOW TV channel in New Delhi that all four gunmen had been killed.

Mr. Abdali described it as a terror attack.

Asked if the Taliban were behind the attack, Mr. Abdali said: “There is no doubt that it is a terror attack, an attack on the friendship of India and Afghanistan.”

“This attack can only embolden our determination that we will keep this friendship at all costs,” he said.

An ITBP official told IANS in New Delhi: “One of the attackers was killed at the entry point only, while three others managed to flee and enter the adjoining building.”

“But in the meantime, Afghan forces joined the operation and gunned down the other three attackers,” the official added. The area has been cordoned off.

The attack in Herat has surprised many as the city, which lies near Afghanistan’s border with Iran, is considered one of the safest in the country.

>Earlier PTI report at 9.47 a.m.