Yemeni President Ali Abdullah Saleh fired his government on Sunday after a string of allies broke ranks with him as he faces increasing pressure from street protests to step down.
Tens of thousands of people turned out for the funerals in what witnesses said was the largest gathering of Saleh's opponents since protests against his autocratic regime erupted in late January.
About 30 bodies were laid out in rows, and the square near Sanaa University overflowed with mourners who gathered under tight security and despite the state of emergency.
On Friday pro-Saleh snipers on rooftops raked demonstrators in the square with bullets in an attack which more than doubled the death toll from several weeks of unrest to around 80.
The violence drew condemnation from the United Nations, the European Union and the United States, which sees Saleh as a key partner in battling al-Qaeda in the region.
Saleh suffered a further blow with the resignation on Sunday of Yemen's ambassador to the United Nations, Abdullah Alsaidi, and human rights minister Huda al-Baan in protest at the deadly attacks on demonstrators.
"Abdullah Alsaidi has submitted his resignation to protest at the use of violence against demonstrators," a foreign ministry official said.
The defections add to a long list of resignations, including two other ministers and 23 MPs who have ripped up their membership of Saleh's ruling party.
In an apparent attempt to placate the opposition the president sacked his government Sunday.
"The president has dismissed the government but asked the cabinet to remain in a caretaker position until a new one is formed," the official Saba news agency reported.
In Cairo, UN chief Ban Ki-moon said sacking the government was not the solution to violence in Yemen.
"I am not sure that the sacking of this cabinet would be the one which honours the expectations of the people," Ban said of Saleh's move.
"They have to start a broad-based dialogue," he said.
Waving Yemeni flags and shouting slogans denouncing the regime, the mourners on Sunday formed a massive procession as they carried the bodies in coffins on their shoulders to the cemetery.
"Ali, the blood of the martyrs will not be in vain," they chanted, referring to Saleh.
"The president gave the orders to shoot," said Ahmad, one mourner.
Ali Abed Rabbo al-Qadi, the head of the independent parliamentary bloc who was in the crowd, said those responsible for the killings must be "held responsible for every drop of blood that has been shed."
Leading Muslim clerics called on Yemeni soldiers to disobey orders to fire at demonstrators, and blamed Saleh -- in power since 1978 -- for Friday's slaughter.
They also demanded that Saleh's elite Republican Guard be withdrawn from the capital.
Saleh had declared Sunday a national day of mourning for the "martyrs for democracy," while blaming the opposition for "incitement and chaos" that led to the killings.
Youth activists panned Saleh's declaration as insincere. "After getting blood on his hands... he cried crocodile tears for the martyrs," they said in a statement.
The opposition says the president must resign this year but he has refused to leave until his current term expires in 2013.
He has also offered to devolve power to parliament under a new constitution, a pledge rejected as "too late" by the opposition which says the president cannot be trusted to honour his promises.
Friday's carnage followed repeated US appeals for restraint and respect for human rights in the impoverished country, which is also struggling to contain a southern secessionist movement and a Shiite revolt in the north.
Rights activists have said Washington should reconsider its military aid to Yemen, where US special forces are helping to train local anti-terror units engaged in the fight against Al-Qaeda's Yemen-based offshoot.
Al-Qaeda in the Arabian Peninsula (AQAP) is allegedly behind several attempted attacks against the United States.
Yemen is also the suspected hideout of radical US-Yemeni cleric Anwar al-Awlaki, an alleged AQAP leader described by a senior US security official as "probably the most significant risk" to the United States.