The attack in restive Khost province, which borders Pakistan in the east, came the day after six medical students were killed and 23 wounded when a suicide bomber struck at Kabul's heavily-guarded main military hospital.
It is the latest in a wave of breaches at supposedly secure Afghan government sites as the annual spring fighting season gets under way in Afghanistan.
Four suicide bombers dressed in border police uniforms broke into the traffic police headquarters in Khost city at around 4:30 am.
There was then sporadic gunfire for hours as troops tried to control the situation from outside before Afghan and foreign forces eventually stormed the building, bringing the fighting to a close around 1:30pm.
Provincial governor Abdul Jabar Naimi told a news conference that four Afghan police and two Afghan soldiers had been killed, while five others, all members of the security forces bar one government employee, were wounded.
"All four attackers who were also wearing suicide vests have been killed," Naimi added. "Two of the attackers managed to detonate themselves but the two others were gunned down."
The Taliban claimed responsibility for the attack in a statement on its website.
Deputy provincial police chief Mohammad Yaqub had said earlier that the four attackers had got into the building while it was vacant except for the police guards and officers on duty.
Yaqub said the attackers were dressed in border police uniform and armed with suicide vests and AK-47 rifles.
There has been a string of recent targeted, high-profile attacks in Afghanistan by Taliban who have managed to penetrate official premises.
Last month, three people died when an attacker got inside the defence ministry in Kabul, while the police chief of Kandahar province was killed by his bodyguard, also in April.
Afghanistan's security forces are frequently targeted by the Taliban and other militants.
The Afghan police and army are to take on more responsibility for security as foreign combat troops withdraw in a process starting from July but not due to be completed until 2014.
There are currently around 130,000 international troops in Afghanistan, the bulk of them from the United States.
At least six people including two women were killed in other incidents across Afghanistan late Saturday and Sunday.
Three Afghan policemen were killed and three wounded late on Saturday when their vehicle was struck by a roadside bomb in the western province of Herat, provincial police spokesman Noor Khan Nikzad told AFP.
In another incident, a border police officer was killed late Saturday when his vehicle was struck by a roadside bomb in the Spin Boldak district of Kandahar, one of the main battlegrounds in the south, the province's police chief Shair Shah Yousufzai told AFP.
Two female civilians died and five others including four women were wounded in the southern province of Zabul on Sunday when the tractor they were travelling in hit a roadside mine, the interior ministry in Kabul said.
And in Kandahar city, the governor's spokesman Zalmai Ayubi said he was shot in the leg by a foreign soldier amid a row over whether he needed to undergo a body search to enter the governor's compound.
A spokesman for the NATO-led International Security Assistance Force, Major Tim James, confirmed Ayubi was shot in an "altercation" when he "attempted to bypass security measures" and a US soldier's rifle "was discharged."
The wound was not serious and Ayubi drove himself to hospital, James added.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ