Witnesses and an AFP reporter also described hearing gunshots immediately after the blast at the electronic identification registration center in Jalalabad, capital of Nangarhar province, where both the Taliban and the Daesh group are active.
"I was in class when I heard a big explosion followed by intense gunfire," said Mohammad Ullah, a teacher at a nearby school.
"The kids started crying so we had to vacate the school. We jumped over the walls to take the students to a safer place," he told the media.
"Security forces are in the area to rescue the staff," said provincial spokesman Ataullah Khogyani.
No group immediately claimed the attack, and it was not clear how many people had been inside the center — where Afghans can register for their national electronic identification cards, or "tazkiras" — at the time.
It came a day after the Taliban killed nearly 50 people and wounded dozens more in two separate attacks, one near a campaign rally for President Ashraf Ghani in the central province of Parwan, and one in Kabul.
The militants have vowed to disrupt the upcoming presidential election, scheduled for September 28, in which President Ashraf Ghani is taking on his own Chief Executive, Abdullah Abdullah, and more than a dozen other candidates.
The winner is hoping for a mandate to negotiate with the Taliban for a lasting peace in the country suffering from decades of violence.
But the insurgents want to undermine the legitimacy of the process and keep the president weak.
"We already warned people not to attend election rallies. If they suffer any losses that is their own responsibility," Taliban spokesman Zabihullah Mujahid said in a statement released after Tuesday's blasts.
They have also promised more violence after US President Donald Trump called off talks earlier this month seeking a deal that would have allowed Washington to begin withdrawing troops from Afghanistan, the site of America's longest war.
But the militants have also repeatedly voiced their belief that the US will have to return to the table for more negotiations eventually.
Chief negotiator Sher Mohammad Abbas Stanikzai reiterated that stance in an interview with the BBC hours after Tuesday's attacks, stating "our doors are open for negotiations".
He also defended Taliban violence during the months of talks, arguing that the Americans had also admitted to killing thousands of Taliban during the discussions.