Explosions and gunfire erupted in Kabul, with police confirming a militant attack in the centre of the Afghan capital but unable to give further details.

"There is an ongoing militant attack in central Kabul," Kabul police CID chief Mohammad Zahir told AFP after the attack began at about 6:30 am.

An AFP photographer said the attack had occurred close to the presidential palace and the ministry of defence, in an area of the city that contains many official buildings and embassies.

The US embassy sounded its "duck and cover" alarm drill and the US-led NATO military coalition said on its Twitter account: "Small arms fire and multiple explosions reported in Kabul. Situation developing."