Police officer Mirza Mohammad said at least one insurgent blew himself up at the entrance to the compound and a number of others wearing suicide vests entered the building. Another police officer said at least three attackers entered the building and two were killed. The officer, who could not be named because he was not authorized to speak to the media, said a gun battle was taking place inside the three-story building.

"There are still there are two or three suicide bombers inside the traffic department compound. They are still fighting," said Mohammad Zahir, the chief of the Kabul police investigation unit. He did not provide any information on casualties. Explosions could be heard inside the building.

Taliban spokesman Zabiullah Mujahid claimed responsibility for the attack in a text message to The Associated Press.

Interior Ministry spokesman Sediq Sediqi said the assault began with suicide car bombing near the building. Two insurgents, he said, were then shot and killed by Afghan forces.

"Still there may be one or two inside the building, but we are not sure," he said, adding that four Afghan police commandos were wounded. Sediqi said there were no civilian casualties in the attack.

The area has been surrounded by Afghan security forces, he said, and police commandos are conducting the operation.

"This shows the ability of the Afghan forces, that they are leading the operation. ... There are no foreign forces are involved," Sediqi said.

A unit of NATO special forces that trains and mentors Afghan police was at the scene but not taking part in the operation.

Gul Rahman, who owns a nearby shop, said he heard at least two explosions when the attack started just before dawn. An Associated Press reporter at the scene said a number of big explosions were heard in and around the building along with heavy gunfire.

Police officer Abdullah Hamidi said two of the explosions were caused by a man in a suicide vest and another by a car bomb.

Traffic police headquarters is located on square leading to the Afghan parliament and is next to the Kabul zoo. It is also next to the Afghan border police headquarters. The facility, usually teeming with civilians seeking to get drivers licenses and registrations for vehicles, was nearly empty at the time of the attack.

It was the second insurgent attack inside Kabul in less than a week.

Last Wednesday, six Taliban suicide bombers attacked the gates of the Afghan intelligence agency in downtown Kabul, killing one guard and wounding dozens. Security forces killed all the attackers. The insurgents carried out the attack by driving a minivan loaded with explosives into a gate of the intelligence agency compound in the capital at noon. The other five attackers wearing suicide vests were in a second minivan that was also loaded with explosives. They were shot and killed and security forces later defused the bomb in their minivan.

The attacks highlighted ongoing violence in Afghanistan and the determination of the insurgency to continue fighting even as President Hamid Karzai and the U.S. negotiate for a quicker pullout of American forces.