* Protesters storm government building in Cairo
* Demonstrators take to streets of Alexandria
* Rage among Islamists, foreign governments deplore bloodshed
* Nearly 250 shrouded bodies lined up in Cairo mosque
By Tom Perry and Michael Georgy
CAIRO, Aug 15 (Reuters) - Hundreds of supporters of Egypt's Muslim Brotherhood stormed a government building in Cairo on Thursday and set it ablaze, as fury over a security crackdown on the Islamist movement that killed hundreds of people spilled on to the streets.
In Alexandria, Egypt's second largest city, hundreds marched to protest against Wednesday's violent breakup of Brotherhood sit-ins in the capital, prompting nationwide violence in which at least 525 people died and thousands were wounded.
"We will come back again for the sake of our martyrs!" the protesters chanted.
They demanded the reinstatement of former President Mohamed Mursi, who was deposed by the army six weeks ago after mass demonstrations against him, and whose ouster triggered a crisis that has polarised the most populous Arab nation.
Brotherhood spokesman Gehad El-Haddad told Reuters that anger within the movement, which has millions of supporters, was "beyond control".
"After the blows and arrests and killings that we are facing, emotions are too high to be guided by anyone," he said.
The Brotherhood has called on followers to march in Cairo later on Thursday, while funeral processions for those who died provide further potential flashpoints over the coming days.
On Wednesday, protesters clashed with police and troops who used bulldozers, teargas and live ammunition to clear two Cairo sit-ins that had become a hub of resistance to the military.
The clashes spread quickly to Alexandria and numerous towns and cities around the mostly Muslim nation of 84 million.
A Reuters witness counted 228 bodies, most of them wrapped in white shrouds, arranged in rows on the floor of the Al-Imam mosque in northeast Cairo, close to the worst of the violence.
Some men pulled back the shrouds to reveal badly charred corpses with smashed skulls. Women knelt and wept beside one body. Two men embraced each other and shed tears by another.
ISLAMISTS IN SHOCK
In the aftermath of the bloodshed, and with the death toll expected to rise further, Mursi supporters were left dazed by a crackdown that was more swift and brutal than most expected.
Army chief General Abdel Fattah al-Sisi removed Mursi from power on July 3 in the wake of huge protests by people frustrated at the lack of progress on economic reform and wary of what they saw as a creeping Islamist power grab.
But the subsequent crackdown points to a bleak future for the Brotherhood, which was suppressed for decades under autocrat Hosni Mubarak before he was toppled in a 2011 uprising.
"It's not about Mursi anymore. Are we going to accept a new military tyranny in Egypt or not?" Haddad said.
Despite shocking scenes in Cairo and beyond, including television footage of unarmed protesters dropping to the ground as security forces opened fire, many Egyptians support the crackdown, underlining how deeply divided society has become.
"The Brotherhood would never agree to a political deal," said Ismail Khaled, 31-year-old manager in a private company.
"They are terrorists and violent, and what happened was the only logical way to end their sit-ins, which did have weapons and ... violent people. Thank God the police ended them. I wish they had done so sooner."
Cairo and other areas were largely calm overnight, after the army-installed government declared a month-long state of emergency and imposed a dusk-to-dawn curfew on the capital and 10 other provinces.
A military source said that while sit-ins like the main one outside the Rabaa al-Adawiya mosque in Cairo would no longer be tolerated, marches may be in spite of the state of emergency.
The decision to forcibly clear sit-ins defied Western appeals for a negotiated settlement to the crisis, amid concerns that the country which has signed a peace treaty with Israel and straddles the strategic Suez Canal could spiral out of control.
French President Francois Hollande summoned the Egyptian ambassador to demand an immediate halt to the crackdown.
"The head of state asserted that everything must be done to avoid civil war," the Elysee Palace said in a statement.
In Ankara, Turkish Prime Minister Tayyip Erdogan called for the U.N. Security Council to convene quickly and act after what he described as a massacre in Egypt.
"I am calling on Western countries. You remained silent in Gaza, you remained silent in Syria ... You are still silent on Egypt. So how come you talk about democracy, freedom, global values and human rights?" he told a news conference.
U.N. High Commissioner for Human Rights Navi Pillay called on all sides to "step back from the brink of disaster".
Pillay, a former U.N. war crimes judge, said the death toll pointed to "an excessive, even extreme use of force against demonstrators".
But the United Arab Emirates, one of several Gulf Arab states unsettled by Mursi's victory in a 2012 election, expressed support for the crackdown, saying the Egyptian government had "exercised maximum self-control".
The Muslim Brotherhood said the true death toll was far higher, with a spokesman saying 3,000 people had been killed in a "massacre". It was impossible to verify the figures independently given the extent of the violence.
The state of emergency and curfew restored to the army powers of arrest and indefinite detention it held for decades under Mubarak.
The army insists it does not seek power, and it has installed an interim government to implement plans for fresh elections in around six months.
But efforts to restore democracy have been overshadowed by the crisis, and the Brotherhood suspects the military is effectively running the country.
Egypt's interim president named at least 18 new provincial governors earlier this week, half of them retired generals, in a shake-up that pushed out Brotherhood members and restored the influence of men from army and police backgrounds.
U.S. Secretary of State John Kerry called the bloodshed in Egypt "deplorable" - a word U.S. diplomats rarely use - and urged all sides to seek a political solution.
A U.S. official told Reuters that Washington was considering cancelling a major joint military exercise with Egypt, due this year, after the latest violence, in what would be a direct snub to the Egyptian armed forces.
After Mursi's ouster, Gulf Arab states pledged $12 billion in aid to Egypt, bolstering its coffers after reserves of foreign currency and food stocks had run dangerously low.
But in the first sign of adverse economic impact from the bloodshed, home appliances maker Electrolux said it halted all output in Egypt, where it has around 7,000 employees, and would review its decision on Saturday.