Afghan Taliban militants said they attacked police, military and intelligence targets in Kabul on Wednesday and security officials confirmed ongoing attacks in at least two areas of the city, but there was no official word on casualties.

A resounding explosion was heard across the city followed immediately by gunfire between security forces and an unknown number of attackers in the west of Kabul.

The fighting was concentrated near a district police headquarters located not far from a military training school, according to one police official, who spoke on condition of anonymity because he was not authorized to talk to the media.

A security official said one attacker was barricaded inside the police building.

A separate attack appeared to have targeted an office of Afghanistan's intelligence agency on the eastern outskirts of Kabul. However a senior army official said that attack appeared to have been quickly suppressed.

"Two terrorists entered a building. One blew himself up and the second was shot by Afghan security forces," said Abdul Nasir Ziaee, commander of 111th corps based in the east of the city.

The Taliban, who sometimes exaggerate the impact of their operations, said the attacks had caused heavy casualties but there was no immediate comment from police and no official word on casualties.

Last month, a suicide bomber killed at least 20 people outside the Supreme Court in Kabul. Militant group Islamic State claimed responsibility for that attack.

The attacks come shortly ahead of the period when the Taliban, seeking to reimpose Islamic law after their 2001 ouster, announce their spring offensive and underline warnings from Afghan officials that they face a very difficult campaign season.

Government forces have struggled to control the Taliban insurgency since the NATO-led coalition ended its combat mission in 2014. According to U.S. estimates, they now control less than 60 percent of the country although they have managed to hold on to all of the main provincial centers.