At least 29 people have been killed in a gun and bomb attack on a government building in Kabul.

Attackers fought Afghan security forces for almost seven hours, as more than 300 staff were evacuated.

The assault started at around 1500 local time (2230 GMT) when a suicide car bomb was detonated outside a multistorey building housing a public welfare department that supports wounded soldiers.

Minutes later, gunmen entered the building and rampaged through the office complex hunting for victims.

“They opened fire on the people and killed them and then made their way to the ministry,” eyewitness Awal Khan Amiri told Tolo News.

Some employees managed to barricade themselves inside offices while police evacuated 357 people, officials said.

Witnesses reported hearing at least five explosions as police and gunmen traded fire, while the second of the building was in flames. One officer died and three were wounded.

No group immediately claimed responsibility for the attack, which follows successive bombing and shooting atrocities targeting public authorities in Kabul by the Taliban and Isis.

Less than a month ago, a British man was among the victims killed by Taliban militants in an attack on UK security firm G4S’s base in the Afghan capital.

Officials said three gunmen had been killed in Monday’s battle, with more than 20 victims dead and 20 more wounded.

There were fears that the toll could rise as police continued to search the smouldering building, interior ministry spokesman Najib Danish said.

Protesters demand better security in Kabul Show all 10 1 /10 Protesters demand better security in Kabul Protesters demand better security in Kabul A woman tries to stop police from firing on protesters during a demonstration in Kabul, Afghanistan, Friday, June 2, 2017. Hundreds of demonstrators demanded better security in the Afghan capital in the wake of a powerful truck bomb attack that killed scores of people. AP Protesters demand better security in Kabul Afghan security officials use a water cannon to disperse demonstrators as they protest against a suicide bomb attack in Kabul, Afghanistan, 02 June 2017. At least 90 people were killed and more than 350 wounded in a suicide bomb attack near the foreign embassies in Kabul on 31 May. AP Protesters demand better security in Kabul A policeman rests during a demonstration in Kabul, Afghanistan, Friday, June 2, 2017. Hundreds of demonstrators demanded better security in the Afghan capital in the wake of a powerful truck bomb attack that killed scores of people. AP Protesters demand better security in Kabul Protesters shout anti government slogans during a demonstration to protest against the lack of security in Kabul, Afghanistan, Friday, Jun 2, 2017. Some 500 people are demonstrating in Kabul for better security in the Afghan capital in the wake of a powerful truck bomb attack that killed 90 people. AP Protesters demand better security in Kabul Police forces run as protesters throw stones during a demonstration in Kabul, Afghanistan, Friday, June 2, 2017. Hundreds of demonstrators demanded better security in the Afghan capital in the wake of a powerful truck bomb attack that killed scores of people. AP Protesters demand better security in Kabul Protesters shout anti government slogans during a demonstration to protest against the lack of security in Kabul, Afghanistan, Friday, Jun 2, 2017. Some 500 people are demonstrating in Kabul for better security in the Afghan capital in the wake of a powerful truck bomb attack that killed 90 people. AP Protesters demand better security in Kabul Protesters throw stones toward security forces during a demonstration in Kabul, Afghanistan, Friday, June 2, 2017. Hundreds of demonstrators demanded better security in the Afghan capital in the wake of a powerful truck bomb attack that killed scores of people. ( AP Protesters demand better security in Kabul Police forces run as protesters throw stones during a demonstration in Kabul, Afghanistan, Friday, June 2, 2017. Hundreds of demonstrators demanded better security in the Afghan capital in the wake of a powerful truck bomb attack that killed scores of people. AP Protesters demand better security in Kabul Protesters throw stones toward security forces during a demonstration in Kabul, Afghanistan, Friday, June 2, 2017. Hundreds of demonstrators demanded better security in the Afghan capital in the wake of a powerful truck bomb attack that killed scores of people. AP Protesters demand better security in Kabul A boy walks past protesters during a demonstration in Kabul, Afghanistan, Friday, June 2, 2017. Hundreds of demonstrators demanded better security in the Afghan capital in the wake of a powerful truck bomb attack that killed scores of people. AP

He said the militants had targeted the National Authority for People with Disabilities and Martyrs’ Families, which supports injured soldiers and the bereaved relatives of members of the security forces killed in years of battles against the Taliban, Isis and other Islamists.

Police cordoned of the area as they tried to secure the building, but Mr Danish said the operation was painstakingly slow as officers moved carefully from room to room and floor to floor.

Kabul police spokesman Basir Mujahid said authorities received at least one telephone call from inside the building, but frightened employees were unable to provide any details.

The attack came two days after Donald Trump announced the withdrawal of half of the 14,000 American troops stationed in Afghanistan.

Earlier on Monday, Pakistan’s foreign minister Shah Mahmood Qureshi was in Kabul to discuss a negotiated end to Afghanistan’s 17-year war. Mr Qureshi, who then continued his trip to Iran, condemned the attack.

Pakistan has helped orchestrate peace talks in the United Arab Emirates (UAE), where representatives from Saudi Arabia, the UAE, Pakistan and the US met with the Taliban.

The terrorist group controls nearly half of Afghanistan and are more powerful than at any time since the 2001 US-led invasion.

Taliban militants carry out near-daily attacks, mainly targeting security forces and government officials, and have been fighting Isis’s local “Khorasan” division for control of parts of Afghanistan.