A suicide bomber wearing the Afghan security forces uniform has detonated himself at the gate of the Interior Ministry in central Kabul, killing at least six police officers.

The ministry confirmed the deaths from Wednesday's attack and said that the bomber detonated himself near the administration buildings.

The Taliban has claimed responsibility for the attack, saying that the bomber had penetrated a "third ring of security" at the ministry. 

"It happened outside the main gate... the bomber tried to enter our human resources department," Sediq Sediqqi, spokesman for the ministry, told Reuters news agency.

"As soon as the bomber saw some policemen he detonated his explosives. It was impossible for him to enter the facility with the suicide vest."

Al Jazeera's Bernard Smith, reporting from Kabul, said: "The Ministry of Interior is considered one of the safest parts of the city, but the bomber detonated himself in the search area at the gate of the ministry."

The Afghan capital is on high alert ahead of an April 5 presidential election which Taliban insurgents have vowed to disrupt.