Officials said the bombing occurred as employees were leaving their offices early for Ramadan.
There was no immediate claim of responsibility for the latest attack in the Afghan capital, but it comes a day before the government’s ceasefire with the Taliban is expected to start.
Health ministry spokesman Waheed Majroh said at least 12 people were killed and 31 wounded in the explosion at the main gate of the Ministry of Rural Rehabilitation and Development.
Employees were gathered at the entrance of the compound waiting for a bus to take them home when the suicide bomber blew himself up among the crowd, said rural ministry spokesman Faridoon Azhand, who was inside the building at the time.
“Unfortunately, we have lost some colleagues,” Azhand told AFP.
Police spokesman Hashmat Stanikzai confirmed at least 12 people had been killed, including women, and another 20 wounded.
Employees were leaving their offices at 1:00 pm (0830 GMT) due to the holy month of Ramadan, when most Muslims fast from sunrise to sunset, when the suicide attacker struck.
Employees inside the ministry at the time of the attack confirmed hearing a blast.
“An explosion happened at the exit gate of the ministry,” Daud Naimi, director of the communications department at the ministry, told AFP.
“I was in my office when I heard a big blast,” another employee told AFP.
“Most of my colleagues were leaving for the day to go home. I am worried about my colleagues. We are told to stay inside for now.”
Afghan President Ashraf Ghani on Thursday announced security forces would halt hostilities with the Taliban for a week.
It would last from the “27th of Ramadan until the fifth day of Eid-al-Fitr”, he said, indicating it could run from June 12-19.
The Taliban said Saturday their fighters would stop attacking Afghan security forces, but only for the first three days of Eid, the holiday capping Ramadan.
It is the first time the militants have agreed to suspend fighting since the 2001 US invasion, and the move was largely welcomed by war-weary Afghans.
Afghan security forces and the Taliban have vowed to retaliate if attacked during the ceasefire.
The militants have also said their ceasefire does not extend to US-led NATO forces, while Kabul said operations against foreign fighters including the Islamic State group will continue.
For more news your way, follow The Citizen on Facebook and Twitter.
Download our app and read this and other great stories on the move. Available for Android and iOS.