SANTIAGO DE COMPOSTELA, Spain — There are the pilgrims who hobble along with a staff, painstakingly making their way through a monthlong journey of contemplation. Then there are the others, looking all the fresher for walking a shorter route or paying a tour operator to carry their backpacks, and more likely to be clutching a cellphone or a guidebook.

All, however, must navigate the proliferating array of souvenir shops selling Jesus key rings and T-shirts and painted scallop shells: the symbol of the pilgrimage to the shrine of St. James, which ends in this city in northwestern Galicia and has become known simply as the Camino, or the Way.

The surge in popularity of the pilgrimage, which dates from the ninth century, has turned what was a spiritual obstacle course in medieval times into a booming part of modern Spain’s tourism industry. At a time when other parts of the economy are still suffering, the pilgrimage has become big business here — so much so that it has invigorated not only local economies but also a debate over how to balance mass tourism and spiritual reflection.

“You suddenly find yourself, exhausted, walking alongside people who are in party mood, as if they were heading to an entertainment park,” said Marie Ange de Montesquieu, who works for a Christian radio station in Paris and was completing a 480-mile route that began on the French side of the Pyrenees.