A Taliban assault on the restaurant of a luxury hotel considered one of the safest places in Kabul and frequented by foreigners and Afghan officials has added to a tide of violence sweeping Afghanistan two weeks before a presidential election.
Taliban gunmen smuggled tiny pistols past the Serena hotel's heavy security cordon.
They then waited for the restaurant to fill up for an Afghan New Year dinner before emerging to shoot diners point-blank.
Three children aged between two and five were found with bullets in their heads. Four of the nine dead were foreigners.
Hours later, a bomb attack in the southerly Kandahar province wounded the deputy governor and left his chief of staff in critical condition.
The Islamist movement has ordered its fighters to use "full force" to disrupt the vote and threatened to kill anyone who participates in what it calls a Western-backed sham.
This week alone, seven or eight suicide bombers killed at least 11 people in the eastern city of Jalalabad, while 18 were killed by a bomb in a marketplace in northern Afghanistan.
The 5 April vote is intended to mark the first democratic transfer of power in Afghanistan's history.
It will be seen as an indication of the prospects for stability as the NATO force that has been reinforcing security since the Taliban were driven from power in 2001 prepares to withdraw most of its troops this year.
The hotel attack started around 6pm yesterday when four attackers managed to get past the dozens of armed guards patrolling the perimeter as well as metal detectors and body searches, possibly concealing their guns in their socks.
Three hours later, they emerged to begin their attack, killing four foreigners from Canada, Paraguay and Bangladesh, according to Interior Ministry spokesman Sediq Sediqqi.
The dead Afghans included the popular journalist Sardar Ahmad of Agence France-Presse, his wife and his two daughters, celebrating the Afghan New Year.
Afghan special forces fought the gunmen for hours as terrified guests barricaded themselves in darkened rooms, listening to gunfire and the sound of running.
Around 100 guests fled into a basement safe room, where they had to struggle with choking smoke from a fire in the kitchen above.
Although six people were killed in an attack on the Serena Hotel in 2008, its heavy security made it one of few places in Kabul where foreign officials were still permitted to dine, after 21 people including three UN staff and a senior IMF official were killed in a Lebanese restaurant in January.
As shots rang out and diners dived under tables, one witness said Mr Sardar had motioned for a foreign man desperately seeking a hiding place to take cover under a table with him and his children.
As two gunmen walked towards the group, Mr Sardar spoke to them in a local language and the gunmen turned away and started shooting in a different direction until they ran out of bullets.
As they reloaded, the foreigner ran into the kitchen, where staff were guiding customers toward the safe room.
But Mr Sardar, his wife and two daughters were killed. Their young son was shot in the head, chest and leg, and was left in critical condition.
All the Taliban gunmen were eventually shot dead, Mr Sediqqi said.
The attack in Kandahar killed at least one person and wounded nine, leaving the governor's chief of staff fighting for his life in a military hospital, officials said.
"The doctor says that he is alive, he's in a coma, but will be okay," said Tawab Ghorzang, a spokesman for Afghanistan's governance agency.