KERBALA, Iraq (Reuters) - Chanting and flailing themselves in mourning for Imam Hussein, hundreds of thousands of Shi ite Muslims from around the world gathered in the Iraqi city of Kerbala on Friday for one of the most sacred rituals in their religious calendar. Arbain marks the culmination of a 40-day mourning period for Imam Hussein, a grandson of the Prophet Mohammed who was killed in a 7th century battle in Kerbala. Shi ites believe his remains are entombed there. Exhausted pilgrims, including women carrying their children, marched long distances to reach the shrines. Many, arriving by air from Iran, Pakistan or Bahrain, had landed in Baghdad several days earlier.  Kerbala, 80 km (50 miles) south of the capital, was cloaked in black because of the robes worn by pilgrims, and bedecked in a sea of flags. Saddam Hussein, a Sunni, banned Shi ite gatherings for religious events for decades. Pilgrims have gathered in sacred Shi ite cities including Kerbala and Najaf for religious duties since a U.S.-led invasion toppled him in 2003. But those gatherings were marred by suicide bombings carried out by Sunni militants, notably from al Qaeda and Islamic State, who regard Iraq s majority Shi ites as infidels.  Now that those groups have largely been defeated by U.S.-backed Iraqi security forces, Shi ite pilgrims may have more peace of mind during this year s Arbain, though security remains tight across the country. Groups of people build camps where they cook, share food with others, and display decorative objects. Banners featuring Imam Hussein s words are put up on walls and buildings.  The ritual is a time for sorrow and self-reflection.  Mourning Shi ites listen to recollections of how Hussein and his family were killed. The theme of martyrdom dominates, as pilgrims gash their foreheads with swords and beat themselves with chains. Hussein s death is interpreted by Shi ites as a symbol of the struggle against injustice and oppression.  Tents have been set up in Kerbala to provide a resting place for pilgrims, where men serve them cups of free tea. Others offer free massages to those arriving on foot from different cities, while tailors work on religious flags at a market. 