Flames rise from a government building after an explosion and attack by gunmen, in Kabul, Afghanistan. Picture: Rahmat Gul/AP

Kabul - Afghan authorities on Tuesday collected 43 bodies from a government compound in the Afghan capital Kabul that was targeted by a suicide bomber and extremists armed with assault rifles on Monday, officials said.

The attack began when the suicide bomber blew up his explosives-laden car in front of a government building that houses a public welfare department in an eastern neighbourhood of Kabul.

Some of the attackers rampaged through the building of the Ministry for Martyrs and Disabled Persons taking workers hostage, and others fought a prolonged gun battle with local security forces.

Health ministry spokesman Wahid Majroh said so far 43 bodies and 10 injured had been transported by ambulances from the attack site. One policeman was killed and three militants were gunned down during seven hours of fighting inside the government compound.

Afghan forces evacuated over 350 civilians from the building before calling off the operation on Monday night. No militant group has claimed responsibility for the complex attack that was identical to previous attacks by Taliban insurgents on government offices, foreign buildings, and military bases.

The latest assault came just days after U.S. President Donald Trump said he was considering pulling out at least 5,000 of the 14,000 U.S. troops currently deployed in Afghanistan.

The possibility of thousands of U.S. troops leaving has triggered confusion and panic in the Kabul government and foreign missions who fear that sudden withdrawal would lead to a Taliban regime who are fighting to expel foreign forces, topple the Western-backed government and restore their version of hardline Islamic law in Afghanistan.

But Marine General Joseph Dunford, chairman of the Joint Chiefs of Staff who was in Afghanistan on Christmas eve was quoted by local news channels as saying that the mission for troops in Afghanistan continues without any changes. “There are all kinds of rumors swirling around,” said Dunford according to local news channels while addressing hundreds of U.S. troops gathered Monday at a base in Afghanistan.

“The mission you have today is the same as the mission you had yesterday," he said.