CAIRO (Reuters) - Egypt's president, accused of fuelling sectarian hatred, promised swift justice on Monday for a deadly attack on minority Shi'ites as he tried to quell broader factional fighting to avoid a threatened military intervention.
The army, which handed power to elected Sunni Islamists a year ago after decades of oppression, warned Mohamed Mursi - and his liberal opponents - on Sunday to end an increasingly violent deadlock or see troops back on the streets to impose order.
There was little sign of reconciliation, however. Liberals and Shi'ites accused Mursi, who will make a speech to the nation on Wednesday evening, of fostering sectarian hatred by associating with radical Sunni preachers.
As the defence chief issued his statement, a reminder of the fragility of the polarised new order that has emerged from the revolution of 2011, a mob in a Cairo suburb was raiding a house where Shi'ites were marking a religious festival, killing four and dragging bodies through the streets to cries of "Infidels!".
Local people said police stood by and failed to intervene.
The unusually violent attack on a minority barely visible in predominantly Sunni Muslim Egypt - though, even at less than 1 percent of the population, Shi'ites still number in the hundreds of thousands - was in part a reflection of sectarian passions inflamed across the Middle East by the war in Syria.
But for the Egyptian opposition, it was also held up as more evidence that Mursi and his Muslim Brotherhood have allied with harder line Islamists to intimidate those who joined them in ousting Hosni Mubarak but who now criticise their handling of a crisis-hit economy and fear they will entrench Islamic rule.
An opposition campaign for mass rallies demanding Mursi's resignation on June 30, the anniversary of his inauguration, has been preceded by shows of strength by his supporters and some street clashes in which at least two men died at the weekend.
Critics accuse Mursi of preferring to build ties with former militants and Salafist hardliners in the Islamist camp, rather than reaching toward the centre. He and the Brotherhood complain their opponents are an obstinate minority who lost the election.
Further trouble is feared in the coming days, with Islamist groups saying they plan more rallies to show their strength and to warn against what they see as attacks on democratic results.
Liberals, secular conservatives, millions of Christians and many less engaged Egyptians simply fed up with shortages and falling living standards hope the "Tamarud - Rebel!" campaign can overcome the opposition disunity that helped the Brotherhood win the series of elections that has given it sweeping control.
But army chief General Abdel Fattah al-Sisi, who insisted he was not seeking political power and was widely believed, also seemed to warn the opposition against trying to overturn Mursi's election. He said the army would defend "the will of the people" and urged politicians to forge a consensus before next Sunday.
"The army is basically sending a warning that it won't tolerate violence. Period. That includes both sides," said Michael Walid Hanna of the Century Foundation think-tank. "Obviously what the military wants is to force a compromise."
Both Mursi and his opponents declared themselves pleased by the call to order from the military, long respected by Egyptians who tended to blame oppression under Mubarak on the police.
"There is a president who is ruling the country in a democratic way," Mursi's spokesman Ihab Fahmy said. "We cannot even think that the army will come back and rule the country."
But although Mursi condemned the "heinous crime" and promised "swift justice" - all sides have condemned street violence for which they blame their opponents - there was little sign of reconciliation talks being held on Sisi's timetable.
"We are still sticking to our position that it's too late for any calls for dialogue," said Khaled Dawoud of the liberal opposition bloc the National Salvation Front, adding that it had received no invitation from Mursi since the army's statement.
"We insist on our call for the president to resign and open the door to early elections."
Mursi's spokesman Fahmy declined to say whether there were plans for negotiations with the opposition, though he said Mursi had previously issued an "open-ended invitation" to talks.
"Our target is to defuse any tension," he said. "I think we can make it very soon ... We are confident that through dialogue we can reach this common consensus."
Mursi said on his Facebook page on Monday he would make an "important speech to the Egyptian people" on Wednesday night. Its contents were not immediately clear.
The uncertainties that political deadlock has generated for the 84 million Egyptians has prompted some precautionary buying of supplies, notably in central Cairo where Tahrir Square has been a focus for protest since the January 25 uprising of 2011.
A slump in tourism, weakening currency and rising world commodity prices, plus a growing population used to subsidised bread and fuel, has put pressure on government finances. That has raised fears of fuel shortages and high-summer power cuts during the Muslim holiday month of Ramadan, now two weeks away.
"The situation is unbearable. The country is falling apart," said Mohamed Emad, 52, who was taking a walk in central Cairo.
"We cannot find food, fuel, water and have electricity cuts and now heading towards a sectarian conflict. We need to wake up and think, and not listen to idiots or liar politicians."
Many appear to welcome the army's pressure on the feuding political factions. "All Egyptians support the army," said Mustafa Adly, 45, as he worked in a sportswear shop in central Cairo. "The president should listen to what it said."
He said he disagreed with Mursi's policies but regarded him as the legitimately elected leader, who should have a chance.
In Sunday's violence in the suburb of Zawiyat Abu Musallem, in sight of the Giza pyramids, a crowd ransacked and torched the house of a family, whose members told Reuters the attack began when a Shi'ite dignitary visited them for a religious festival.
They yelled "Infidels!", said one woman who survived and who complained that police failed to intervene during the frenzied violence in the house and rubbish-strewn alley outside. "The Salafis and the Brotherhood - they're the ones who attacked us," added the woman, clearly in shock, sitting in her wrecked home.
A video posted online by rights activists showed dozens of men and youths looking on as several others drag the bloodied body of at least one man along a street, one pulling on what may be a rope around his neck. In other sequences from the events on Sunday, a squad of riot police is present and a group of black-robed women on a crowded, narrow street chant "No God but God!"
Additional reporting by Maggie Fick, Yasmine Saleh and Shaimaa Fayed in Cairo and Alexander Dziadosz in Zawiyat Abu Musallem; Writing by Alastair Macdonald; Editing by Alison Williams