At least seven people have died and 34 others have been injured near the Pakistani capital during a religious procession.
The violence began when Shi'ite Muslims observing the holiday of Ashura went into a Sunni seminary and dragged out at least two people who they beat to death on the street.
The Shi'a said the Sunnis had shouted insults at them.
At least 34 others, many of them police, were injured trying to stop the violence in Rawalpindi, which is next to Islamabad.
Several shops near the seminary were also set on fire.
Gunshots were also reported.
Soldiers eventually restored order.
Ashura commemorates the seventh century death of the Prophet Muhammad's grandson Hussein.
Conflict between Sunnis and Shi'a dates to that time.
Between 5 and 20 percent of Pakistanis are Shi'ite Muslims. .
Based on reporting by AFP and AP