Four Taliban fighters who attacked a compound housing foreign workers in the Afghan capital have been killed in a failed assault there.

The Taliban claimed responsibility for the attack in an area in eastern Kabul known as the "Green Village." 

A loud explosion followed by sporadic gunfire was heard on Wednesday evening. The interior ministry confirmed that the initial blast had been a car bomb.

General Mohammad Zahir, the police chief, said there were no civilian or military casualties in the attack.

The heavily fortified Green Village houses foreigners working for international service companies.

"At around 9pm an explosion occurred near the custom office and near Green Village," Hashmat Stanakzai, Kabul police spokesman, told the AFP news agency.

Live Box 201491152731407786

The blast occured outside the gate of the Green Village, the scene of previous attacks targeting the foreigners living there.

Al Jazeera's Abdullah Shahood, reporting from Kabul, said: "Taliban activities are increasing in the area, according to Afghan intelligence."

The initial blast knocked out power to some residential areas in Kabul.

Attacks of this type have been increasing in Afghanistan in the months since President Ashraf Ghani was inaugurated as president and before the withdrawal of foreign forces at the end of the year.

Ali Latifi, a journalist based in Kabul, told Al Jazeera the attack was unusual as it happened in the evening.

"Normally these attacks happen during the morning or the afternoon," he said.

"There is also the fact that it is winter, when attacks are supposed to dissipate, so it is worrying that there are still attacks happening in the capital."

Source: Al Jazeera and agencies