A group of armed men late Sunday attacked the Indian consulate in Mazar-e-Sharif, the capital of northern Balkh province, the provincial governor spokesperson told media.
Officials said attackers have taken up positions inside a residential home located in front of the Indian mission and are firing on the consulate.
"The number of attackers were 4, two of them killed but not confirmed by police yet," Afghan news agency Pajhwok Afghan News said in a tweet.
"Two attackers were killed in fighting after insurgents attacked Indian consulate in Mazarisharif city," it said in an earlier tweet.
Sources told Xinhua news agency that there were no casualties on the Indian side.
"Two of the four militants, who targeted the three-member consulate, have been gunned down by Afghan special forces," the sources said.
In a series of tweets, Pajhwok Afghan News earlier said: "Police confirmed blast in gun fires in PD4 near to #Indian consulate in #Afghanistan's Mazar-i-Sharif city."
"Balkh governor spokesman told Pajhwok that attackers entered a house and firing on Indian Consulate in Maza-i-Sharif city."
"Police says, no casualties were reported yet from attack on #Indian Consulate in Maza-i-Sharif city."
"Gun fires resumed after armed people attacked #Indian Consulate in MazairSharif city."
BBC also said explosions and gunfire were heard near the Indian consulate.
The report said it was not immediately clear whether the consulate was directly targeted, as the area also has a building belonging to a local politician.
Indian diplomatic missions in Afghanistan have come under militant attacks earlier too. In 2008 and 2009, the embassy in Kabul was attacked, leaving dozens dead.
In May 2014, gunmen attacked the Indian consulate in Herat, while in August 2013, nine civilians died when the consulate in Jalalabad was targeted.