Suicide bombers have killed at least seven people at the funeral in Kabul of a senator's son who died during a protest over security on Friday, Afghan officials say.
More than 100 people were wounded in the attack, which hit the funeral of one of five people killed when police fired on a march against deteriorating security.
The chief executive of Afghanistan, Abdullah Abdullah, survived the attack.
The latest violence comes as much of Kabul is in lockdown and amid popular anger at the government.
Officials warned people to stay away from demonstrations, saying they might be attacked by militants. Checkpoints were set up in central Kabul, and armoured vehicles were patrolling the streets.
In a televised address, Mr Abdullah said three suicide bombers were among those attending the funeral of a senator's son who was killed in Friday's protest.
He said an investigation must determine how the attack happened. No group has said it was behind it and the Taliban denied involvement.
President Ashraf Ghani said on Twitter: "The country is under attack. We must be strong and united."
He later said: "We must not let ourselves fall into the trap that the enemies have spread to our country."
Rahmatullah Begana, who was at the funeral, said the first explosion went off at the start of the ceremony.
"A few minutes later, there was another explosion. I saw a lot of people on the ground covered with blood," he said.
Another witness told AFP news agency that "people were blown to pieces".
Friday's protest followed a bomb attack on Wednesday which killed 90 people in the city's diplomatic district.
Afghan intelligence officials have blamed the Haqqani network, a Taliban affiliate with alleged links to Pakistan.
The Taliban denied any role and there has been no comment from so-called Islamic State militants, who are usually quick to claim attacks.
More than a third of Afghanistan is now said to be outside government control.
The US has about 8400 troops in Afghanistan, while another 5000 from Nato allies are in the country.