AMONG THE MORE heartening aspects of the peaceful revolution that toppled Hosni Mubarak was the way it brought together people from across Egypt’s social and religious spectrum. Muslims joined hands, literally and figuratively, with members of the country’s large Coptic Christian minority and stood together for democracy.

So one of the most disheartening events since Mr. Mubarak’s downfall was the sectarian violence in Cairo over the weekend, in which 13 people, six Muslims and seven Coptic Christians, died. Security personnel apparently did little to stop the mayhem, which began when Muslim men advanced on a Coptic church and armed Christians gathered to defend it. It was an episode disturbingly similar to many others over the past decades in which Egyptian Christians came under attack and the Mubarak regime did little or nothing to prevent or punish the perpetrators.

That was the sort of behavior one could expect from an authoritarian regime that probably preferred having public anger directed at the Copts than at more appropriate targets, such as the government itself. Even in the final days of the Mubarak regime, the Copts came under attack: On New Year’s Eve 2010, a suicide bomb attack on the Coptic Orthodox Church in Alexandria left 21 dead; a month later, Muslims in southern Egypt killed 11 Copts in home invasions.

The latest attacks on Copts appear to be the work of extremist Muslims known as Salafists, who are taking advantage of the newfound freedom in Egypt to act out. They do not represent the majority of the country’s Muslims. To their credit, leaders of Egypt’s transitional government swiftly denounced the violence and floated measures to discourage it, but that’s not enough. Authorities must prevent religiously motivated attacks and punish the perpetrators consistently in civilian courts — not through the discredited state security forces, as the government has suggested so far. Otherwise, the situation on the streets could polarize, forcing more members of the Muslim majority and the Coptic minority (roughly 10 percent of Egypt’s 83 million people) to take sides.

Pressure on Christian minorities, violent and otherwise, has been a chronic feature of the Arab and Muslim political landscape in recent years. In Pakistan, gunmen murdered two high-profile opponents of laws that impose the death penalty for insulting Islam; one victim was a Christian, the other the son of a Muslim father and a Christian mother. Iraq was home to more than 1 million Christians before the 2003 U.S. invasion; roughly half have fled, largely because of radical Islamist attacks.

But the stakes are especially high in Egypt, the largest and most influential Arab state — and, as the homeland of the ancient Coptic community, the Arab state with the largest non-Muslim population. If democracy is to work in Egypt, it must rest on a foundation of fair and equal treatment of all citizens, regardless of faith. As the U.S. government nurtures a new political order there, it should encourage Egypt’s transitional government and the moderate majority of its people to defend the revolution against those who would tear it apart along sectarian lines.