A group of militants, including a suicide truck bomber, targeted a Kabul guesthouse for foreign contractors early on Monday, killing one policeman and wounding four, Afghan authorities said. The Taliban claimed responsibility for the attack.

The Interior Ministry said "terrorists" used a truck full of explosives to breach the perimeter wall of the Northgate Hotel around 1:30 a.m. local time. Three gunmen then entered the premises and started shooting.

The ministry's deputy spokesman Najib Danish said the truck driver was killed when he detonated the explosives. The blast in the eastern part of the Afghan capital shook the city and was followed by widespread power outages. A Taliban statement said they had sent heavily armed operatives as part of the attack.

Abdul Rahman Rahimi, the Kabul chief of police, said all the attackers who were on foot had been killed and that none of the hotel's residents were harmed. A man identifying himself as Steve Jones answered the phone at the hotel and said all the guests were safe. "We have 100 percent accountability," he said.

However, as daylight broke and Afghan policemen deployed at the site kept the roads leading to the hotel sealed off, questions remained as to how the insurgents were able to bring a truck loaded with explosives into the Afghan capital.

Police among dead and injured; Taliban claims responsibility 1:05

Foreign guesthouses have long been a Taliban target. The Northgate Hotel was attacked in July 2013, in a similar manner, with a truck bomb breaching the gate and gunmen storming the compound. Reports at the time said that four security guards were killed before the attackers were shot dead.

Afghan officials investigate at the site of a truck bomb attack in Kabul. (Mohammad Ismail/Reuters)

The Northgate, which is east of Kabul's international airport and near the Bagram Air Base, is typical of many pre-fabricated compounds that offer secure accommodation to foreigners working in the Afghan capital. According to its website, it offers much the same services as any hotel, along with high security, sniffer dogs, airport transfers and "background checks, if necessary."

The ministry's statement on the hotel attack said that police commandos arrived and surrounded the facility, but had to be careful because fuel tankers were stored in the area. They waited until dawn before trying to find the gunmen. "The operation finished at 7:30 am when the terrorists were killed," the statement said.

Monday's attack followed a massive suicide bombing that struck a peaceful rally by Afghanistan's minority ethnic Hazara community on July 23 that killed more than 80 people and wounded hundreds. The Hazaras were rallying to call for a power project to be rerouted through their impoverished region in the central highlands when the suicide bomber hit.

An Afghan policeman stands guard near the site of the blast. (Mohammad Ismail/Reuters)

That attack was claimed by the Islamic State group, which emerged last year in Afghanistan as an affiliate of the militant group fighting in Iraq and Syria. It was the IS Afghan branch's first assault in Kabul and the deadliest attack in the Afghan capital since the U.S.-led invasion to oust the Taliban regime in 2001.

The Taliban statement on Monday's attack noted that guesthouses occupied by foreigners, especially "Americans invaders," are frequent targets.

In May 2015, the Taliban struck the Park Palace guesthouse in central Kabul, killing 14 people, including nine foreigners. In December 2014, four people, including three members of a South African family, were killed in a Taliban attack on the compound of a U.S.-based educational charity.

Truck bombs, however, remain a major concern for Afghan authorities because of the potential for huge casualties, especially in the built-up suburbs of the capital. Last August, a huge explosion in the Shah Shaheed area was attributed to a truck bomb having possibly detonated prematurely. The death toll was officially put at around 15, with hundreds wounded and a massive crater left in the middle of the residential area.