First, there are 2 major sponsors of Islamic related terrorism in the world - Iran and Saudi Arabia.
Iran is mainly Shia Muslim and Saudi Arabia is mainly Sunni Muslim.
The great majority of Muslims are Sunnis - estimates suggest the figure is somewhere between 85% and 90%.
The fundamental difference between Sunnis and Shia Muslims:
a. Sunnis believe the successor to Mohammad to be the Rashidun "rightly guided Caliphs", who were the first four caliphs who ruled after the death of Muhammad - the below mentioned "Ali" being one of the four.
b. The Shia claimed the right of Ali, alone, the son-in-law of the Prophet Muhammad, and his descendants to lead the Islamic community.
Throughtout the Muslim world Shias hate Sunnis, Sunnis hate Shias, and both groups hate the West and Israel.
The manner in which each group prays is different as well as many views on the Qur'an and the Hadith (kind of like a guidebook to the Qur'an).
Al Qaeda is a Sunni adherent sect.
ISIS (or the Islamic State) is Sunni and is an offshoot of Al Qaeda.
The Muslim Brotherhood, also a Sunni adherent sect, has been outlawed in Eqypt.
Whether a person is a Shia 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 Shias are singled out for execution.
ISIS believes that the Shias are apostates and must die in order to forge a pure form of Islam.
But how can ISIS tell whether a person is a Sunni or a Shia? From accounts of people who survived encounters with the militants, it seems they often ask a list of questions. Here are some of them:
What is your name?
A quick look at an Iraqi's national identity card or passport can be a signal. Shias believe that the leadership of Islam was passed down through the Prophet Muhammad's son-in-law Ali and his sons Hussain (or Hussein), Hassan and Abbas, among others. While some Sunnis and members of other Islamic groups may also have those names, ISIS would most likely associate them with the Shias.
Where do you live?
In every city and province, even majority Sunni ones, there are enclaves that are known to be Shia. People who said they came from one of those neighborhoods would most likely be killed.
How do you pray?
Shias and Sunnis offer prayers in slightly different ways, with Sunnis generally folding their hands or crossing their arms in front of their stomachs and Shias leaving them extended, palms resting on their thighs.
In a chilling video that appeared to have been made more than a year ago in the Anbar Province of Iraq, ISIS fighters stopped three truck drivers in the desert and asked them whether they were Sunnis or Shias. All three claimed to be Sunni. Then the questions got harder. They were asked how they performed each of the prayers: morning, midday and evening. The truck drivers disagreed on their methods, and all were shot.
What kind of music do you listen to?
Recordings of religious songs could also be a tipoff. Similarly, even the ringtone on a person's telephone could be a clue because it might be from a Sunni or Shia religious song.
There are other clues, but none are completely reliable. For instance, a number of Shias wear large rings, often with semiprecious stones. But so do some Sunnis, and others.
Generally, Iraqi Shias and Sunnis are often indistinguishable in appearance. That is even more evident in many families and tribes in which there has been intermarriage for generations.
Given that the rigid views of ISIS are fairly well known, it is perhaps natural to wonder why hostages do not simply lie about their origins. It seems that many do, yet in very tense, perilous encounters, people can easily get tripped up. Sometimes another person in a group might inadvertently give someone away. Others refuse to lie about their faith.
Curiously, Hezbollah in Turkey is a Kurdish Sunni terrorist group and Hezbollah in Lebanon is Shia - funded by Iran.