The Islamic State group claimed it had attacked the Iraqi embassy in Kabul Monday, as a series of explosions and the sound of gunfire shook the Afghan capital in a continuing assault.

A security source told AFP that a suicide bomber had blown himself up outside the Iraqi embassy. "Civilians are being evacuated" from the area as the attack is ongoing, said the official, who declined to be named.

There was no immediate information about casualties.

Two members of "the Islamic State attack the Iraqi embassy building in the Afghan city of Kabul", said the jihadist group's propaganda agency Amaq without providing further details.

At least four explosions, along with the sounds of gunfire and grenades, were heard near the city's diplomatic quarter shortly after 11:00 am (0630 GMT).

Security forces rapidly descended on the area and the sirens of ambulances rushing to the scene could also be heard. A column of smoke rose from the blast site.

Police confirmed at least one blast but said they did not immediately have further information.

The Iraqi embassy is located in northwestern Kabul, in a neighbourhood that is home to several hotels and banks as well as large supermarkets and several police compounds.

"I heard a big blast followed by several explosions and small gunfire," said Ahmad Ali, a nearby shopkeeper.

"People were worried and closed their shops to run for safety. The roads are still blocked by security forces."

The attack is the latest to rock Kabul, and comes as the resurgent Taliban intensify their offensive across the country.

A week ago, a car bomb struck the city during morning rush hour, killing at least 26 people in an attack claimed by the Taliban.

But the Islamic State group, recently ousted from the Iraqi city of Mosul, have been expanding their footprint in eastern Afghanistan and claimed responsibility for several devastating attacks in Kabul.

A recent UN report showed that nearly 20 percent of all civilian deaths in Afghanistan in the first half of 2017 took place in Kabul.

Many of those deaths occurred in a single attack in late May when a truck bomb exploded during the morning rush hour, killing more than 150 people and injuring hundreds.

No group has officially claimed responsibility for that attack, the deadliest in the capital since the US invasion in 2001.

NATO forces ended their combat mission in Afghanistan at the end of 2014. Since then Afghan troops and police, beset by soaring casualties, have struggled to beat back the insurgents.

The US is considering whether to send thousands more troops to help the beleaguered Afghan forces as the war-weary country is gripped by increasing insecurity.