Known as Ashura, the ritual is celebrated on the tenth day of the Islamic month of Muharram (the first month of the lunar calendar).
It marks the death of Imam Hussein, the grandson of the Holy prophet in 680 AD in Karbala, near Baghdad in Iraq. He was killed by political rivals alongside an army of 72 men. Hussein’s body was then mutilated, leading to his martydom.
As well as marking the occasion with self-flagellation – to emulate the suffering of Hussein – some take part in processions which involve walking on coals and carrying a ‘Tazia’ – a replica of his coffin.
The death of Hussein is the event which led to the split in Islam between the two sects of the Shiite and the Sunnis.
Shiites, who constitute Islam’s second-largest denomination (between 10-15 per cent of the Muslim population) consider Hussein to be the one true heir of Muhammad’s legacy.
Some Shiite leaders discourage the bloodletting, claiming it creates a negative image and encourage people to donate blood instead.
Sunni Muslims consider Ashura a fast day because Muhammad fasted then and Moses fasted in appreciation of the successful Exodus for Egypt.
Flagellation is also carried out by some Catholics, although it is no longer a widespread practice.
The late Pope John Paul II would whip himself, according to a nun who used to care for him.
And in the Philippines, devotees wearing crowns of twigs are nailed to crosses in a yearly rite, despite discouragement by church leaders.
These images show flagellation ceremonies in Iraq and Afghanistan.