Gunmen attacked the Ministry of Communications and IT in central part of capital Kabul on Saturday.
The attack started with a blast which happened at 11:40 a.m. near the ministry, said Nasrat Rahimi, a spokesman for Interior Ministry.
The assault involved three suicide bombers who attacked the ministry's post office building taking benefit of a shrine, Rahimi said.
He said that police surrounded the area and crises response unit reached to foil the attack.
City police chief, Mohammad Roshandil, said that search and clearance operation was underway from top and bottom of the multi-storey building. He also said that the building was being evacuated.
The siege ended five hours later when all the attackers were reported killed.
At least two people were killed while six more injured in the attack, said Wahidullah Mayar, a spokesman for Public Health Ministry.
Communications minister said that five of the ministry's employees were killed while several others were wounded in the attack.
Taliban denied invovlement in the attack.