Millions of Shiite Muslims from around the world are making their way this week to their sect's holy shrines in the Iraqi city of Karbala, a pilgrimage that is as much about community as it is about religion.

The shrines are of two revered Shiite imams: Hussein, the grandson of the Prophet Muhammad, and his half-brother Abbas. The annual commemoration, called Arbaeen, draws more pilgrims each year – according to Iraqi figures – than the hajj in Saudi Arabia, a pilgrimage required once in a lifetime of every Muslim who can afford it and is physically able to make it.

Pilgrims stream toward Karbala on foot from the cities of Najaf, 45 miles away, Baghdad, 55 miles to the north, and other places farther afield, resting along the way in tents lined with foam mattresses and fleece blankets.

"Our fathers and our grandfathers walked to Karbala, and God willing, our children will, too," said Karrad Karim, a pilgrim journeying with four friends from Baghdad. They brought with them large flags bearing devotional sayings to the Shiite saints, but little in the way of supplies for the four-day journey.

That's because along the roads, stalls set up by charities, mosques, and devotional groups see to it that no traveler goes hungry. Cooks prepare vast amounts of stewed lamb, grilled fish, fresh bread, and rice for the pilgrims, refusing payment for the meals.

The pilgrimage, known in Arabic as the Ziara, marks the 40th day of mourning of the anniversary of Hussein's 7th century death at the hands of the Muslim Umayyad forces in the Battle of Karbala, during the tumultuous first century of Islam's history.

Hussein was seen by his followers as the rightful heir of the prophet's legacy. When he refused to pledge allegiance to the Umayyad caliphate, he was killed in the battle, cementing the schism between Sunni and Shiite Islam. Hussein's half-brother Abbas was also killed in the battle.

Modern depictions of Hussein, stitched on banners displayed along the pilgrimage, show him with blood on his brow and bearing a Christ-like countenance.

But the mood is not all somber among the pilgrims. Spirits were high as travelers approached Karbala, and improved further with generous helpings of dates and tea.

"This is a walk to heaven," said Alaa Dadi, who was making his way with his wife and three children.

Sunnis outnumber Shiites by a wide margin among the world's estimated 1.5 billion Muslims, and Shiite rituals are far less known. The hajj is considered one of the five pillars of Islam, and an obligation for all Muslims – Sunni and Shiite. The Ziara is voluntary and holds little significance in Sunni tradition.

In recent years, the Iraqi government says Karbala received 10 to 20 million visitors during the event, with many Shiite pilgrims coming from Iraq. No figures have yet been released for 2018.

This year's pilgrimage is the first since Iraq's government declared victory over the Islamic State group in January, but the threat of insurgent attacks still lingers. The militant group has deliberately targeted Shiites in Iraq and elsewhere to destabilize the region. Thousands of Iraqi soldiers and special police forces have been deployed to protect the pilgrims along the routes.

Iranian religious affairs official Hussein Zulfighari said 1.7 million Iranians had already crossed into Iraq for the pilgrimage, and predicted the number could reach 2 million by the event's climax on Oct. 30. Mr. Zulfighari, quoted in Iran's Fars news agency, said the visitors include 50,000 Afghan Shiites living in Iran.

Muhammad Thiqawi, from Iran, said he was initially hesitant about making the journey this year. A month ago, protesters in Iraq's southern city of Basra burned down Iran's Consulate over what they felt was the country's undue influence over Iraqi affairs. Iran, the region's Shiite power, exerts considerable sway over Iraqi politics through its support for Shiite parties and government-backed militias.

But, he said, "the Iraqis hosted us in their homes and welcomed us. They said Iranians are our friends and guests of Hussein." On his child's stroller, he pinned a poster of the two countries' flags.

Ali al-Alizi traveled from Qatif, a Shiite province in eastern Saudi Arabia that has been the target of repression by the Sunni monarchy.

Lord Maurice Glasman, a Labour peer in Britain's House of Lords who was raised Jewish, said he came at the encouragement of his Iraqi friends to better understand the country that defeated the Islamic State group's insurgency.

"Politically, ethically, spiritually, it has been an extremely elevated visit," said Mr. Glasman, who arrived in Karbala on Oct. 28, after walking several days from Najaf.

The hajj saw 2.4 million pilgrims this year but Saudi authorities regulate the tradition tightly, driving up costs for pilgrims and depriving it of some of the spontaneity seen in the Ziara. For many Muslims who cannot afford to go on the hajj or cannot get the Saudi visa, the Ziara is a satisfying alternative.

Get the Monitor Stories you care about delivered to your inbox. By signing up, you agree to our Privacy Policy

"The hajj is required by God, but the Ziara is voluntary," said Sayyid Abdelamir Mousawi. "Those who go do it out of love."

This story was reported by the Associated Press.