* First major attempt to disrupt canal traffic fails
* Fans torch police club, soccer headquarters in Cairo
* Islamist government struggling to keep law and order
* Islamist groups offer popular committees as backup
* Police on alert for jihadist attacks in Sinai (Adds warning of Islamists)
By Yousri Mohamed and Marwa Awad
PORT SAID, Egypt/CAIRO, March 9 (Reuters) - Egyptian protesters torched buildings in Cairo and tried unsuccessfully to disrupt international shipping on the Suez Canal, as a court ruling on a deadly soccer riot stoked rage in a country beset by worsening security.
The ruling enraged residents of Port Said, at the northern entrance of the Suez Canal, by confirming the death sentences imposed on 21 local soccer fans for their role in the riot last year, when more than 70 people were killed.
But the court also angered rival fans in Cairo by acquitting a further 28 defendants whom they wanted punished, including seven members of the police force, reviled across society for its brutality under deposed autocrat Hosni Mubarak.
Security sources said two people, a man in his 30s and a young boy, had died in Cairo from the effects of tear gas and rubber bullets. A total of 65 people were injured.
Saturday's protests and violence underlined how Islamist President Mohamed Mursi is struggling - two years after Mubarak's overthrow - to maintain law and order at a time of economic and political crisis.
Islamist groups and parties backing Mursi warned against a looming security breakdown and called on their followers to form popular protection committees to guard the streets and public property should police fail to do so.
The presidency said in a statement that the protests had not been peaceful and condemned violence against property. The cabinet issued a similar statement and called on Egyptians to unite and respect court rulings.
On Thursday, Egypt's election committee scrapped a timetable under which voting for the lower house of parliament should have begun next month, following a court ruling that threw the entire polling process into confusion.
The stadium riot took place last year at the end of a match in Port Said between the local side Al-Masry and Cairo's Al-Ahly team. Spectators were crushed when panicked crowds tried to escape from the stadium after a pitch invasion by Al-Masry supporters. Others fell or were thrown from terraces.
DEATH BY HANGING
Judge Sobhy Abdel Maguid, listing the names of the 21 Al-Masry fans, said the Cairo court had confirmed "the death penalty by hanging". He also sentenced five more people to life imprisonment while others out of a total of 73 defendants received shorter terms.
In Cairo, local Al-Ahly fans vented their rage at the acquittals, setting fire to a police social club, the nearby offices of the Egyptian soccer federation and a branch of a fast food chain, sending smoke rising over the capital.
A military helicopter scooped up water from the nearby Nile and dropped it on the burning buildings.
"Ultra" fans, the section of Al-Ahly supporters responsible for much of the violence, said they expected retribution for those who had planned the Port Said "massacre".
"What is happening today in Cairo is the beginning of the anger. Wait for more if the remaining elements embroiled in this massacre are not revealed," the Ultras said in a statement.
In Port Said, where the army took over security in the city centre from the police on Friday, about 2,000 residents who want the local fans spared execution blockaded ferries crossing the Suez Canal. Witnesses said youths also untied moored speedboats used to supply shipping on the waterway, hoping the boats would drift into the path of passing vessels.
Military police recovered five speedboats and brought them back to shore, but two were still drifting, one witness said.
Authorities controlling the Canal, an artery for global trade and major income source for the Egyptian government, said through traffic had not been affected. "The canal ... is safe and open to all ships passing through it," Suez Canal Authority spokesman Tarek Hassanein told the MENA news agency.
Hazem Salah Abu Ismail, a popular Salafi preacher, condemned attempts by the opposition and youth groups to "burn the country down" as a pretext to create a power vacuum and bring back military rule.
"We will face any attempts by the opposition ... to bring back military rule. We have popular blocs to protect and guard," Ismail said.
The Salafi Al-Nour Party and the Gama'a al-Islamiyya, blamed for a spate of violence in Egypt in the 1990s, made similar statements, calling on their followers to replace the police force should it pull off the streets.
General Ahmed Wasfy, who heads the army division in Port Said rejected calls for a return to military rule. The military is in charge of security in Port Said and other canal cities.
"The Egyptian armed forces is a combat institution not a security institution. No one can imagine the army replacing the interior ministry," he was quoted on MENA as saying.
In a separate security threat, the Interior Ministry ordered police in the Sinai peninsula to raise their state of alert after receiving intelligence that jihadists might attack them, MENA reported.
Officials have expressed growing worries about security in the desert region, which borders Israel and is home to a number of tourist resorts.
Last Thursday, Bedouin gunmen briefly held the head of U.S. oil major ExxonMobil in Egypt and his wife. The Britons, who had been heading for a Sinai resort, were released unharmed.
General unrest is rife as Egypt's poor suffer badly from the economic crisis. Foreign currency reserves have slid to critically low levels and are now little more than a third of what they were in the last days of Mubarak.
The Egyptian pound has lost 14 percent against the dollar since the 2011 revolution and the budget deficit is soaring to unmanageable levels due to the cost of fuel and food subsidies. (Additional reporting by Patrick Werr, Sylvia Westall and Yasmine Saleh, Writing by David Stamp; Editing by Kevin Liffey and Stephen Powell)