* Death toll in five days of violence reaches 52
* Army had ruled Egypt in transition after Mubarak fell
* Early morning calm on debris-strewn Cairo streets (Adds Interior Ministry comment)
By Edmund Blair and Tom Perry
CAIRO, Egypt, Jan 29 (Reuters) - Egypt's army chief said political unrest was pushing the state to the brink of collapse - a stark warning from the institution that ran the country until last year as Cairo's first freely elected leader struggles to curb bloody street violence.
Abdel Fattah al-Sisi, a U.S.-trained general appointed by President Mohamed Mursi last year to head the armed forces, added in a statement on Tuesday that one of the primary goals of deploying troops in cities on the Suez Canal was to protect the waterway that is vital for Egypt's economy and world trade.
Sisi's comments, published on an official army Facebook page, followed 52 deaths in the past week of disorder and highlighted the mounting sense of crisis facing Egypt and its Islamist head of state who is striving to fix a teetering economy and needs to prepare Egypt for a parliamentary election in a few months that is meant to cement the new democracy.
Violence largely subsided on Tuesday, although some youths again hurled rocks at police lines in Cairo near Tahrir Square.
It seemed unlikely that Sisi was signalling the army wants to take back the power it held for six decades since the end of the colonial era and through an interim period after the overthrow of former air force chief Hosni Mubarak two years ago.
But it did send a powerful message that Egypt's biggest institution, with a huge economic as well as security role and a recipient of massive direct U.S. subsidies, is worried about the fate of the nation, after five days of turmoil in major cities.
"The continuation of the struggle of the different political forces ... over the management of state affairs could lead to the collapse of the state," said General Sisi, who is also defence minister in the government Mursi appointed.
He said the economic, political and social challenges facing the country represented "a real threat to the security of Egypt and the cohesiveness of the Egyptian state" and the army would remain "the solid and cohesive block" on which the state rests.
Sisi was picked by Mursi after the army handed over power to the new president in June once Mursi had sacked Field Marshal Hussein Tantawi, in charge of Egypt during the transition and who had also been Mubarak's defence minister for 20 years.
The instability has provoked unease in Western capitals, where officials worry about the direction of a powerful regional player that has a peace deal with Israel. The United States condemned the bloodshed and called on Egyptian leaders to make clear violence was not acceptable..
The 58-year-old previously headed military intelligence and studied at the U.S. Army War College. Diplomats say he is well known to the United States, which donates $1.3 billion in military aid each year, helping reassure Washington that the last year's changes in the top brass would not upset ties.
One of Sisi's closest and longest serving associates, General Mohamed el-Assar, an assistant defence minister, is now in charge of the military's relations with the United States.
Almost seven months after Mursi took office, Egyptian politics have become even more deeply polarised.
Opponents spurned a call by Mursi for talks on Monday to try to end the violence. Instead, protesters have rallied in Cairo and Alexandria, and in the three Suez Canal cities - Port Said, Ismailia and Suez - where Mursi imposed emergency rule.
On Tuesday, thousands were again on the streets of Port Said to mourn the deaths of two people in the latest clashes there, taking the total toll in Mediterranean port alone to 42 people. Most were killed by gunshots in a city where weapons are rife.
Mohamed Ezz, a Port Said resident speaking by telephone, heard heavy gunfire through the night. "Gunshots damaged the balcony of my flat, so I went to stay with my brother," he said.
Residents in the three canal cities had taken to the streets in protest at a nightly curfew now in place there. The president's spokesman said on Tuesday that the 30-day state of emergency could be shortened, depending on circumstances.
In Cairo on Tuesday afternoon, police again fired teargas at stone-throwing youths in a street near Tahrir Square, the centre of the 2011 uprising. But the clashes were less intense than previous days and traffic was able to cross the area. Street cleaners swept up the remains of burnt tyres and other debris.
The police have been facing "unprecedented attacks accompanied by the appearance of groups that pursue violence and whose members possess different types of weapons", the state news agency reported, quoting the Interior Ministry spokesman.
Street flare-ups are a common occurrence in divided Egypt, frustrating many people desperate for order and economic growth.
Although the general's comments were notably blunt, Egypt's military has voiced similar concerns in the past, pledging to protect the nation. But it has refused to be drawn back into a direct political role after its reputation as a neutral party took a pounding during the 17 months after Mubarak fell.
"Egyptians are really alarmed by what is going on," said Cairo-based analyst Elijah Zarwan, adding that the army was reflecting that broader concern among the wider public.
"But I don't think it should be taken as a sign that the military is on the verge of stepping in and taking back the reins of government," he said.
In December, Sisi offered to host a national dialogue when Mursi and the rivals were again at loggerheads and the streets were aflame. But the invitation was swiftly withdrawn before the meeting went ahead, apparently because the army was wary of becoming embroiled again in Egypt's polarised politics.
Protests initially flared during the second anniversary of the uprising which erupted on Jan. 25, 2011 and toppled Mubarak 18 days later. They were exacerbated in Port Said when residents were angered after a court sentenced to death several people from the city over deadly soccer violence.
Since the 2011 revolt, Islamists who Mubarak spent his 30-year rule suppressing have won two referendums, two parliamentary elections and a presidential vote.
But that legitimacy has been challenged by an opposition that accuses Mursi of imposing a new form of authoritarianism. Mursi's supporters says protesters want to overthrow Egypt's first democratically elected leader by undemocratic means.
The army has already been deployed in Port Said and Suez and the government agreed a measure to let soldiers arrest civilians as part of the state of emergency. Sisi reiterated that the army's role would be to support the police in restoring order.
Mursi's invitation to rivals to a national dialogue with Islamists on Monday was spurned by the main opposition National Salvation Front coalition, which described it as "cosmetic".
The presidency said a committee would be formed to look at changes to the constitution, but it ruled out changing the government before the parliamentary election.
Mursi's pushing through last month of a new constitution which critics see as too Islamic remains a bone of contention. (Additional reporting by Yasmine Saleh and Omar Fahmy in Cairo, Yusri Mohamed in Ismailia and Abdelrahman Youssef in Alexandria; Writing by Edmund Blair; Editing by Alastair Macdonald and Peter Millership)