The people killed on a hill in the northern part of Kabul had not been identified. The public health ministry confirmed the casualties. Ministry spokesman Wahid Majroh said 87 people were wounded.
Embattled President Ashraf Ghani condemned the assault, calling it an "outrageous attack on mourners burying the martyred."
"The country is under attack," Ghani said. "We must be strong and united."
Afghan chief executive Abdullah Abdullah and Foreign Minister Salahuddin Rabbani were among those attending the funeral. They were reportedly safe.
The funeral was for the son of deputy head of Senate, Salim Ezadyar. A helicopter was seen landing on the hill while ambulance sirens were heard heading to the site of the explosions.
Earlier, authorities had urged locals to end anti-government protests because of reports that militants would target any gathering, similar to one that killed scores of people last year.
There was no immediate claim of responsibility for Saturday's blasts, which were suicide attacks. The resurgent Taliban said it was not involved in the assault.
The attack drew condemnation from political parties and ordinary Afghans.
Friday's protest was launched following a series of deadly attacks by insurgents, including one in Kabul that killed more than 100 people and wounded hundreds more Wednesday.
In addition to civilians, Friday's protesters included several political figures and a key factional leader, Ahmad Zai Masood, whom President Ashraf Ghani fired from a top government job recently.
They demanded removal of Ghani's shaky government and pushed for formation of an interim administration, at least partly for its failure to stop the attacks.
The protesters chanted anti-American and anti-Pakistani slogans, demanded execution of militant inmates and accused the government of being too lenient in the fight against the insurgents.
The resurgent Taliban, with whom the government has been trying broker a peace deal, has denied involvement in Wednesday's attack. The Afghan government has blamed it on the Haqqani network, which is seen as the operational wing of the Taliban.
Friday's protest became violent after some of demonstrators continued moving forward after entreaties by police to stop several hundred meters away from the presidential palace, witnesses said. Security forces opened fire and used water cannons and tear gas to disperse the crowd. Five protesters died and almost 10 were wounded.
Ghani on Saturday ordered an investigation into the incident to "identify those who acted unlawfully."
The commander for Kabul's garrison, General Gul Nabi Ahmadzai, in a news conference later Friday said some protesters carried weapons and wounded some security personnel.
Ahmadzai and General Murad Ali Murad, a deputy interior minister, urged the protesters to end their demonstration, citing fears that suicide attackers would target such rallies, as they did last year.
"Therefore, we hope that you avoid holding strikes, gatherings and protests for some time to come," Ahmadzai said Saturday.
Scores of anti-government demonstrators were killed in a 2016 suicide attack in Kabul. Affiliates of the Islamic State claimed responsibility for that attack.
While accusing security personnel for using "excessive" force during Friday's protest, some members of the civil society said the rally was hijacked by a group of armed men.
The United Nations' special representative to Afghanistan, Tadamichi Yamamoto, warned that the protests could lead to further violence and strongly urged opportunists not to use the emotional moment to cause instability.
On Saturday, security forces were seen blocking roads in central parts of the city amid fears of more protests. Several armored personnel carriers and additional armed personnel were deployed in at least three areas of Kabul.
Some schools, government institutions and key government buildings remained shut. Traffic was not allowed in some downtown areas.
A small group of protesters started a sit-in with several tents on Saturday outside a hospital on an avenue leading to the presidential palace. Zia Masood has reportedly vowed to lead and continue the sit-in, with some protesters warning they plan to turn the protest like the one in Tahrir Square in Egypt that marked the start of the Arab Spring in 2011.
Masood's son, Ahmad Zubair Masood, who is also among the protesters, used the term "Afghan Spring" to describe the demonstrations in Kabul. "This is not Cairo, this is Kabul," Ahmad Zubair Masood said. "People are arriving from all provinces. Tanks and bullets won't stop them."
In addition to the Kabul rally, a small and peaceful anti-government gathering was held in the northern city of Mazar-e Sharif on Friday.
Continued protests could paralyze and further weaken Ghani's government, which is facing internal divisions. The protests come as President Trump is reviewing his Afghan policy amid a push by some members of his administration to send more troops to Afghanistan for fighting the Taliban and other militant groups.
About 8,000 U.S. troops are currently deployed in Afghanistan.
Afghan government forces have struggled to contain an aggressive Taliban insurgency and regional militants linked to the Islamic State.
The government has been weakened by internal disputes, and public disillusionment with its failure to provide jobs and security has grown steadily.
(This story has not been edited by NDTV staff and is auto-generated from a syndicated feed.)