An assault on three government buildings in the Afghan capital, Kabul, has left at least 27 people, including eight attackers, dead.
Frightened children were escorted away from the ministry of justice. The attack follows a number of similar assaults last year and comes at a time when President Hamid Karzai is offering to sit down and start peace talks with the Taliban.
In one attack, two suicide bombers detonated explosives at an office responsible for prisons in the north of the capital.
Five gunmen attacked the justice ministry and another suicide bomber targeted the education ministry.
The Taliban have said they carried out the attacks.
A spokesman said they were in response to the treatment of Taliban prisoners in Afghan jails.
The interior ministry said overall 35 people were injured. The attacks come in the week the new US envoy for Pakistan and Afghanistan, Richard Holbrooke, is expected to visit Kabul.
The international forces in Afghanistan condemned the attacks as "callous and indiscriminate".
Taliban warning
Five gunmen attacked the justice ministry at 1005 (0535 GMT), Interior Minister Hanif Atmar said.
He said the attackers killed 10 staff members, two intelligence workers and a policeman.
The five gunmen were all killed in a three-hour operation he said.
Mr Atmar said that almost simultaneously two suicide attackers targeted the Prisoner Affairs Department in the north of the city.
Six policemen were killed there and 29 people wounded, the minister said.
He added: "At 1003 our ministry of education was attacked by a terrorist suicide attacker who was armed with weapons and suicide vests.
"He was identified by our security forces and gunned down before achieving his goal."
At one point the justice minister was locked inside his office under armed protection.
There was constant gunfire there as police scaled the building with ladders to enter through windows.
Student Assadullah Jagdalak was inside the justice ministry and said he hid under a table when he heard shooting outside the building.
"Security guards started shooting and then the attackers responded by killing other security guards. One got inside the building and started shooting, one guy got upstairs," he said.
Salim Hayran, who works at the education ministry, told the BBC: "After I heard the firing I could see from my window people running and the security guards everywhere."
The commander of Nato's International Security Assistance Force, Gen David McKiernan, condemned the attacks.
"Once again the Taliban have displayed that they have no respect for Afghan citizens or any desire to see a peaceful future in Afghanistan," he said.
Our correspondent says there had been a warning that the Taliban were planning a high-profile attack.
He says the attack follows a number of similar assaults last year and comes at a time when President Hamid Karzai is offering to sit down and start peace talks with the Taliban.
The incident comes after US military chief Adm Mike Mullen said more American troops were needed urgently in Afghanistan.
US President Barack Obama is expected to announce soon how many extra US troops could be sent to Afghanistan, and has called for Nato reinforcements.
Mr Holbrooke is expected in Kabul later this week, after his visit to Pakistan.
Before he left for the region, he said Afghanistan would be "much tougher" to solve than Iraq and that he had "never seen anything like the mess we have inherited".