Suicide bombers and gunmen launched apparently coordinated attacks on two Kabul police stations Wednesday, killing at least five people, with security forces still searching for several assailants as the city braces for more violence.

A series of loud explosions rocked the Afghan capital in the late morning and were quickly followed by volleys of gunfire as police engaged in fierce battles with militants.

The Taliban and Islamic State group claimed responsibility for the attacks. But Afghanistan's intelligence agency blamed the Taliban's Haqqani Network and Pakistani militant group Lashkar-e-Taiba for both incidents.

At least five people were killed and 16 wounded in the attacks, health ministry spokesman Waheed Majroh told reporters.

Two police officers were also killed, the interior ministry said, but it was not immediately clear if they were included in the health ministry's toll.

After an easing of attacks in Kabul in February, Taliban and IS militants have stepped up raids in the city in recent months.

IS claimed the first attack on a police station in a heavily Shia-populated neighbourhood in the city's west, which police spokesman Hashmatullah Estanakzai told AFP had ended.

Interior minister Wais Barmak told reporters three attackers were killed in that incident, after they used grenades to set fire to a room in the police compound.

Two policemen were also killed and two others wounded, Barmak added.

Majroh said four people were killed and nine wounded in that attack.

Ariana TV footage showed a thick plume of black smoke rising into the sky while a photo posted on Twitter purportedly of the west Kabul police station showed a building on fire.

The second attack, claimed by the Taliban, took place in front of a police station in Shar-e-Naw neighbourhood in downtown Kabul where special forces were still searching for them.

‘A suicide bomber detonated his vest at the entrance of the street and a car dropped four other attackers nearby,’ Barmak explained.

‘One was killed by the police and three are still hiding in a building.’

Majroh said one person was killed and eight others wounded.

Estanakzai told AFP that surrounding buildings had been evacuated but it was not clear if people were trapped inside with the attackers.

AFP correspondents heard a loud explosion in the late afternoon, which a police source said was caused by a suicide attacker blowing himself up.

A travel agency that handles Indian visa applications is located on the same street as the Shar-e-Naw police station. The Indian embassy and some of its consulates in Afghanistan have previously been targeted by the Taliban.

‘There were about 300 people inside Shaheer travel agency. Had the police not stopped the attackers they would have caused a disaster,’ Barmak said.

Pakistan condemned the attacks as ‘blatant terrorism targeting innocent civilians’, according to a statement from the country's foreign affairs ministry.

- Increased attacks -

The attacks came as a strong 6.2-magnitude earthquake rocked Afghanistan, shaking buildings in Kabul where people were already on edge.

The attacks happened just over a week after twin blasts in Kabul killed 25 people, including AFP chief photographer Shah Marai and eight other journalists.

Those attacks were claimed by IS.

The Taliban recently launched their annual spring offensive, in an apparent rejection of a peace talks overture by the Afghan government.

Their Operation Al Khandaq will target US forces and ‘their intelligence agents’ as well as their ‘internal supporters’, a Taliban statement said on April 25.

Barmak said the Taliban had taken control of two districts in the past 24 hours, one in the northern province of Baghlan and the other in the northwestern province of Faryab.

Kabul has long been one of the deadliest places in Afghanistan for civilians.

A suicide bomber targeting a blood drive for victims of recent attacks blew himself up in a city park on Monday after being spotted by police, causing no other casualties.

On April 22, a suicide bomber detonated himself outside a voter registration centre in the city, killing 60 people and wounding more than 100.

That was among a series of attacks across the country in places where people were signing up to vote.

The Taliban and IS have made clear their intentions to disrupt the parliamentary and district council elections scheduled for October 20.

General John Nicholson, who leads US and NATO forces in Afghanistan, said previously that protecting Kabul was a priority for foreign troops.

But he acknowledged that preventing attacks would be challenging in the sprawling city that is poorly mapped and extremely porous.

Related Story