The attack on the new building of the Ministry of Interior of Afghanistan, on the airport road in Kabul, ended after nearly two hours when 10 attackers were killed by government forces, a spokesman for the ministry confirmed.
Ten assailants attacked the ministry after an explosives-laden vehicle detonated at the front gate of the compound, according to Interior Ministry spokesman Najib Danish.
Meanwhile, also in Helmand, a district governor says a suicide vehicle bomber wounded six people, including three policemen, on Thursday morning.
In the eastern Logar province, Taliban suicide bombers attacked a police station, killing at least three policemen.
The Taliban and the Afghan IS affiliate have both carried out scores of attacks, mainly targeting security forces and the country's Shiite minority, that have killed hundreds of people in recent years.
"We broke their dream so that they will never try to attack military installations particularly the minister of interior", Danish said.
There was no immediate claim of responsibility for the attack, but previous attacks - often following the same pattern of a bombing followed by a firefight - have been claimed variously by the Islamic State or the Taliban.
He said it was not the first time that militants had donned USA military uniforms, but that it had "been well over a year since we've seen that". The attackers did not manage to enter the main compound.
The Taliban have not officially responded, but deadly attacks have proliferated since then, particularly in Kabul, which has become the most unsafe place in the country for civilians.
Another four police and eight civilians, including two children, were wounded in the attack early Wednesday, said Shah Poor Ahmadzai, spokesman for the provincial police chief. However, a U.S. government watchdog agency recently reported that it saw few signs that this strategy was working, while acknowledging that the Afghan security forces are getting better training.
The Taliban claimed the attack.
Image copyright EPA Image caption Cleaning up in Kabul - the capital keeps getting hit by attacks Who are the Taliban?
Under surveillance by the Marines, the Taliban fighters returned to their Helmand stronghold, a center for poppy cultivation.
The militants were also threatening to overrun parts of Takhar province in the country's north this week, claiming to have seized arms and equipment after seizing police checkpoints in the besieged Kwajah Ghar and Dasht-e Qalah districts along the Tajikistan border.