The gun battle continued for more than an hour. Ghazni's Khawaja Omari district was considered one of the province's safest districts. The province is reportedly under Taliban control. Rahmani said, the attackers planted mines to stop reinforcements from coming to help the government forces fend off the attack.
The center of Khwaja Omari district is 10kms far from Ghazni City and shares a border with Jaghato district of Wardak province.
The militants also set off an improvised explosive device (IED) and fired a rocket on responding police unit that arrived at the scene, resulting a police commander killed and four police officers wounded, the official added.
Afghan officials say at least 15 people have been killed, including a district governor, after Taliban militants attacked a district government compound in southeastern Afghanistan.
Taliban said they have captured the district, a claim that was rejected by the local police officials, the TOLO News said. Travel by road between Kabul and Kandahar province, a traditional Taliban heartland, is considered unsafe because of large swaths are now under Taliban control.
Mohammad Arif Noori, a spokesman for the governor of Ghazni Province, said that Taliban insurgents attacked the government compound of Khwaja Umari district.
Ramazan Ali Moseni, deputy chief police in Ghazni province, said seven of the dead were police officers and five were members of the country's intelligence agency known by the initials NDS.
Anti-government elements also continued to direct attacks against the minority Shiite community, with 154 of its members killed or wounded, "nearly all from suicide and complex attacks" claimed by ISIS, the report said.
The casualty figures are impossible to independently verify because of the remoteness of the area.