Gunmen targeted Shia pilgrims in Kabul late Tuesday as they gathered near a shrine to celebrate the festival of Ashura, one of the most important on the Shiite calendar, the Ministry of Interior said.
"Three attackers opened fire, two were killed," said ministry spokesman Sediq Sediqqi, who was not able to clarify whether there were casualties.
The third assailant was still on the loose, he said.
Police evacuated pilgrims at the scene, according to local television station Tolo News.
Karte Sakhi shrine, where the attack took place, is located in the west of the Afghan capital, near Kabul University.
The threat of attack targeting Shias was considered particularly serious during Ashura, and many foreign embassies had restricted their staff's movements until the end of the week in Kabul.
Ashura, which will be celebrated Wednesday, commemorates the death of Imam Hussein, grandson of the Prophet Muhammad, who was assassinated in 680 and whose tragic end laid the foundation for the faith.
For Shias around the world, Ashura is a symbol of the struggle against oppression.
The last attack on the Afghan Shia minority, on July 23 in Kabul, killed 84 people and left 130 injured. It was claimed by the Islamic State organisation.