Kabul security department spokesman Khalid Zadran in a statement said that the clashes in the Karta-e-Sakhi area of Kabul have ended.
He said multiple attackers were killed and one of them has been detained.
According to Zadran, two force members were killed, including one female, and four others were wounded in the clash.
Earlier, Kabul security department spokesman Khalid Zadran said security forces were conducting a clearing operation when gunfire came from a house. He said the residence was surrounded by Islamic Emirate forces.
The residents said that the clashes began around noon and the two sides were using heavy and light weapons.