At least three people were killed and 257 wounded on Friday as Egyptian protesters and security forces clashed in the worst violence in weeks, overshadowing the vote count in the latest round of a landmark general election.
State television reported that three people were killed in the clashes that continued through the night on a street lined with government buildings and parliament.
Two were shot dead, a health ministry official told AFP.
The clashes, which raged since dawn, were the bloodiest since five days of protests in November killed more than 40 people just ahead of the first general election since the ouster of president Hosni Mubarak in February.
One of the dead was Emad Effat, a senior cleric in the government-run Dar al-Ifta, the state's official interpreter of Islamic law, the institution said in a statement published by the official MENA news agency.
Dar al-Ifta "considers him a martyr, with God the exalted," the statement said.
Footage posted on Youtube showed the bloodied cleric lying prone on the street before protesters carried him away.
The violence erupted at dawn after a protester said he had been arrested by soldiers and beaten up, infuriating his comrades who began throwing stones at the soldiers, witnesses said.
Protesters threw petrol bombs as the clashes continued through the morning with troops and military police repeatedly charging the crowd, AFP correspondents reported.
"The people demand the execution of the field marshal," they chanted in reference to Hussein Tantawi, the head of the Supreme Council of the Armed Forces, which took over following Mubarak's ouster.
Pictures of military policemen grabbing a women by her hair, and another looming over a sobbing elderly lady with his truncheon quickly circulated on the social networking site Twitter, enraging activists.
The military police pulled back to a side street but the demonstrators were pelted with stones by men in plain clothes from another government building.
Blogger Mostafa Hussein said demonstrators managed to reach the lobby of the cabinet offices after breaking down the front gate, but were pushed back by a large number of troops.
An AFP correspondent saw bloodied protesters being carried away by comrades and a string of arrests made.
Signup to our newsletter and follow us on Facebook and Twitter!
Troops later released some of the detained demonstrators, who emerged bloodied and bruised from what they said was a beating by their captors.
The ruling military council blamed the protesters for the violence, in a statement published by the official MENA news agency.
It denied that soldiers tried to disperse the sit-in, saying the protesters had fired birdshot and thrown petrol bombs.
The council "affirms that the security personnel are exercising the utmost self restraint, and they did not assault protesters," the statement said.
Mohamed ElBaradei, the former UN nuclear watchdog chief turned dissident and presidential candidate, condemned what he said was a "savage" attempt to disperse the sit-in.
"Even if the sit-in was illegal, should it be dispersed in such a savage and brutal way, which in itself is a bigger violation of all laws and humanity," he asked on his Twitter account.
The Muslim Brotherhood's Freedom and Justice Party, which has dominated the parliamentary election so far, condemned "the assault on protesters and the attempt to disperse them."
Tantawi, in a gesture apparently aimed at mollifying the protesters, ordered the treatment of all civilians wounded at military hospitals, which are usually better equipped than civilian counterparts, state television reported.
The demonstrators have been camped outside the cabinet offices since November 25, when they branched off from larger demonstrations in nearby Tahrir Square, the nerve centre of the 18 days of protests that led to the downfall of Mubarak.
They objected to the military's appointment of a new caretaker prime minister, calling on the generals to transfer power fully to a civilian government.
The military has said it will only step down once a president has been elected by the end of June following a protracted series of phased parliamentary polls.
The count was under way on Friday in the second stage of elections for the lower house of parliament. A third stage next month will be followed by a similar three-phase election to the upper house before the presidential vote.
As in the first phase last month, Islamist parties were leading the liberals, according to initial results, state media reported.
The Brotherhood had been widely forecast to triumph as the country's best organised political movement, well known after decades of charitable work and its endurance through repeated crackdowns by the Mubarak regime.
The good showing by the Salafists has been a surprise, raising fears of a more conservative and overtly religious legislature.