Egypt's Islamist president on Monday condemned the brutal killing of four Shiites by a cheering Sunni Muslim mob while the police looked on, saying the culprits must be swiftly brought to justice.

But opponents of President Mohammed Morsi said he was in part to blame for implicitly supporting his hard-line allies as they stir up incitement against Shiites in response to Syria's civil war. A week earlier, Morsi appeared on stage with hard-line clerics denouncing Shiites as "filthy." Critics warn that militant Islamists are acting with dangerous impunity.

Sunday's attack in the village of Zawiyet Abu Musalam, near the Pyramids of Giza, came as about 30 Shiites were having a meal to mark a religious occasion. Hundreds of young men descended on them in the house.

In online videos of the killings, young men armed with metal and wooden clubs, swords and machetes, beat the Shiites on the head and back, trapping them in the narrow entrance of the house.

The Shiites beg for mercy as blood streams down their heads and soaks their robes. A crowd pressing around them triumphantly chants "Allahu akbar" or "God is great." Others screamed "You sons of dogs!" One video shows a young man dragging the motionless and bloodied body of one victim by a rope.

The videos appeared genuine and conformed with Associated Press reporting on the attack.

Among those killed was a prominent Shiite cleric, Hassan Shehata. Afterward, the attackers congratulated each other, one witness, local activist Hazem Barakat, said in written and video account of the events he posted online. He said that in the weeks preceding the attack, ultraconservative Salafi clerics in the area had been speaking out against Shiites.

A two-paragraph statement by Morsi's office condemned the killings. It said the culprits must be found quickly and brought to justice, vowing that authorities will not be "lenient" with anyone who interferes with the nation's security and stability.

Police identified 13 suspects but have not yet made any arrests, security officials said, speaking on condition of anonymity because they were not authorized to talk to the press.

A spokesman for the Muslim Brotherhood, from which Morsi hails, also denounced the killings.

But in a seeming show of conservative Sunnis' distaste for the sect, he would not refer to the victims as Shiites. In a posting on his Facebook page, Ahmed Aref identified them as "the four dead who have beliefs of their own that are alien to our society."

The violence was startling, even in a country where violence has increased dramatically in the two years after the ouster of autocrat Hosni Mubarak.

Mobs in rural areas have in recent months lynched suspected criminals amid a rise in gangs robbing motorists and banks. Police still often don't act to stop crimes, and the public has grown increasingly frustrated over increasing economic hardships and shortages. Violence has also become a feature of Egypt's polarized politics, with opponents and supporters of Morsi repeatedly clashing in the streets.

Attacks against Christians, their businesses or churches have risen in frequency. They are often sparked by specific feuds — even if fed by hard-line clerics' anti-Christian statements.

Sunday's attack, in contrast, seemed a straight-forward unleashing of hatreds, prompted only by the Shiites' religious practice. Egypt's population of 90 million is overwhelmingly Sunni Muslim, with about 10 percent Christians. The small Shiite minority is largely hidden and its size never firmly established, though some estimates put it as high as 1 or 2 million.

"Killing and dragging Egyptians because of their faith is a hideous result of the disgusting 'religious' discourse which was left to mushroom," top reform campaigner Mohamed ElBaradei wrote in his Twitter account.

"We are waiting for decisive steps from the regime and Al-Azhar (mosque) before we lose what is left of our humanity."

His Dustour Party blamed the president. It said the attack was "a direct result of the disgusting hate speech ... escalating and expanding under the sight ... of the regime and in presence of its president and with his blessings."

Al-Azhar, the world's primary seat of Sunni Islamic learning, which has also warned against the spread of Shiism in Egypt, said in a statement Monday that it was "terrified" by the killings. "Islam, Egypt and the Egyptians are unfamiliar with killing because of religion, doctrine or ideology," it said.

The past few months have seen a dramatic rise in anti-Shiite hate speech by Salafis, many of whom are Morsi supporters. Salafis, an ultraconservative movement of Sunni Islam, view Shiites as heretics and regularly denounce them on TV talk shows, websites and in mosque sermons, warning they seek to bring their faith to Egypt. The divide between the two main sects of Islam dates back to a dispute over succession following the death of the Prophet Muhammad in the 7th Century.

Bahaa Anwar Mohammed, a spokesman for Egypt's Shiites, accused Morsi and the Brotherhood of "sacrificing Egypt's Shiites to please the Salafis."

A presidential spokesman on Monday rejected any link between Morsi and anti-Shiite comments.

"The presidency is responsible for the official statements and will not comment on unofficial statements," spokesman Ihab Fahmy told reporters. "The president's position is against any kind of incitement of violence or hatred among Egyptian society."

But analysts believe Morsi is trying to strengthen Salafi backing ahead of mass protests due June 30 by secular and liberal opposition and youth movements calling for his ouster. The tactic came after one Salafi group, al-Nour Party, dropped its support for the president.

At a June 15 rally attended by Morsi, aimed at showing support for Syrian rebels, Salafi clerics railed against Shiites. One cleric, Mohammed Hassan, called on Morsi "not to open the doors of Egypt" to Shiites, saying that "they never entered a place without corrupting it." Another called Shiites "filthy." Morsi remained silent during the speeches.

In a similar vein, a cleric who addressed the rally denounced those participating in the June 30 protests as non-believers, reciting a prayer traditionally used against "enemies" of God and Islam.

The increase in anti-Shiite rhetoric came in part as a backlash against an attempt by Morsi to reach out to mainly Shiite Iran after nearly 30 years of frosty Cairo-Tehran relations. The conflict in Syria, pitting Sunni rebels against the regime dominated by Alawites — an offshoot of Shiism — has further fueled the rhetoric.

The al-Nour Party has put up posters around the county saying Shiites have distorted the Quran, Islam's holy book, and kill Sunnis.

Khaled Said, a spokesman for the Salafi Front, a major group in the movement, condemned the killings in Zawiyet Abu Musalam.

But, he added, "this is a normal reaction to blasphemy and corruption of the faith by Shiites."

"We said before that we will not permit Iranian intervention and expansion in Egypt."