BAGHDAD — Whether a person is a Shiite or a Sunni Muslim in Iraq can now be, quite literally, a matter of life and death.

As the militant group the Islamic State in Iraq and Syria, or ISIS, has seized vast territories in western and northern Iraq, there have been frequent accounts of fighters’ capturing groups of people and releasing the Sunnis while the Shiites are singled out for execution.

ISIS believes that the Shiites are apostates and must die in order to forge a pure form of Islam. The two main branches of Islam diverge in their beliefs over who is the true inheritor of the mantle of the Prophet Muhammad. The Shiites believe that Islam was transmitted through the household of the Prophet Muhammad. Sunnis believe that it comes down through followers of the Prophet Muhammad who, they say, are his chosen people.