On January 2, 1986, Paulo Coelho participates in a ceremony at a mountain peak in Brazil's Serra do Mar range to be ordained as a Master of the Order of RAM, a fraternity within a network of esoteric orders known as "the Tradition." He buries his old sword and his Master places a new one before him. When Paulo reaches for it, the Master stamps on his fingers and rebukes him for avidity, pride, and fascination with miracles. Paulo should have refused the sword so it could be given freely. Now he must seek it among simple people along a path of ordinary experience. The Master hands the sword to Paulo's wife with private instructions: It will be hidden along a medieval route in Spain known as the Strange Road to Santiago.
Seven months later, Paulo and his wife fly to Spain. She hides the sword where the Master specified while Paulo begins his pilgrimage. The Road to Santiago is one of three sacred Christian pilgrimage routes, leading to the burial site of the apostle San Tiago (Saint James) in Compostela, a city in northwestern Spain. At its peak in the 14th century, over a million people walked the route annually.
In the French Basque town of Saint-Jean-Pied-de-Port, Paulo registers with Mme Lourdes, an elderly woman who oversees pilgrims. When he speaks the Ancient Word, a password identifying members of the Tradition, she recognizes his purpose, dresses him in pilgrim garb, and administers an oath of obedience to his guide. Outside the city, a gypsy man by an abandoned well offers to find Paulo's sword. Before Paulo can accept, a second man arrives with the correct countersign and introduces himself as Petrus, an Italian of about 40 who will serve as Paulo's guide. After a tense standoff, the gypsy departs. Petrus explains the gypsy was a hostile manifestation of the devil, distinct from the morally neutral "devil" of the Tradition's teachings, and warns they will encounter similar figures on the Road.
Over seven days, Paulo and Petrus cross the Pyrenees on foot. Petrus teaches the Seed Exercise, a rebirth meditation in which Paulo curls into a fetal position and imagines himself growing upward like a seed. On the seventh day, Paulo nearly loses himself in the trance, and Petrus must intervene. He then reveals they have walked in circles, covering only 17 kilometers in six days, to demonstrate that the journey matters as much as the destination.
At the village of Roncesvalles, Petrus introduces Paulo to Father Jordi, a monk he calls "a great sorcerer," who performs a ritual over Paulo's scallop shells bearing the image of Our Lady of the Visitation, causing them to glow. Father Jordi explains the Jacobean route is one of four sacred roads corresponding to the four suits of a card deck and sends Paulo on his way, guided by yellow markers across Spain.
As they walk, Petrus delivers a series of teachings through RAM practices. He speaks about "the good fight," warning that people kill their dreams by claiming lack of time, settling into false certainties, and accepting a deadening peace. He gives Paulo the Cruelty Exercise to combat self-destructive thoughts and teaches that each person has a "messenger," a rebellious angel operating on the material plane who can become a powerful ally if treated as a friend. He also instructs Paulo that confronting an enemy sometimes requires meeting it on its own terms. In Estella, Paulo performs a fire-visualization ritual to encounter his personal devil. Between two imagined billows of flame, he perceives a figure named Astrain and recognizes his messenger.
In a small town where a gypsy was once burned for sorcery, Petrus leads Paulo to a house where the villagers believe a curse persists. The old woman's large black dog hypnotizes Paulo, who spontaneously speaks in tongues, a divine grace of the Holy Spirit. The words shield him as the dog grows aggressive, then flees. Paulo is overwhelmed by his first experience of agape, the love that consumes. Petrus explains that Paulo exorcised the demons possessing the dog and warns it will return.
In Logroño, they attend a wedding banquet where Petrus explains the three Greek words for love: eros (romantic love), philos (friendship), and agape. Paulo notices Petrus behaves like an ordinary person all evening, demonstrating that the RAM practices are meant for common people. Later, at an abandoned hermitage, Petrus describes enthusiasm as agape directed at a specific goal and teaches the Blue Sphere Exercise, a meditation in which participants imagine blue light emanating from the heart and spreading outward to envelop the world, during which a hermit monk named Alfonso silently appears to join them before vanishing into the darkness.
Left alone one night, Paulo performs the Buried Alive Exercise, imagining his own burial in vivid detail until terror and regret drive him to scream and break free. Afterward, he perceives death as a gentle companion that will never allow him to defer living. He faces further ordeals, including climbing a waterfall over 50 feet high. Behind the curtain of water, the rock face holds many cavities, making the ascent far more feasible than it appeared. Each trial deepens Paulo's understanding that obstacles look worse from a distance than they prove up close.
At the ruined village of Foncebadon, Paulo deduces through the Shadows Exercise, a technique of contemplating shadows while eliminating wrong solutions to a problem until only the correct answer remains, that his sword is hidden in a church near Santiago. Petrus then disappears, and the black dog from the cursed house reappears. It attacks, tearing Paulo's flesh. When a shepherd's flock momentarily distracts the animal, Paulo seizes the moment. Remembering Petrus's lesson about meeting an enemy on its own terms, he fights back with primal ferocity. He corners the dog at a precipice but realizes the demons, called Legion, have entered him. Invoking agape, he forces them out of his body and into the ground.
After recovering from his wounds, Paulo raises a fallen wooden cross along the Road using only his bandaged hands. At a train yard in Ponferrada, Petrus reveals the great secret of the Road: One can learn only through teaching. He teaches Paulo the Dance Exercise, the final RAM practice, in which one dances spontaneously to surrounding sounds while allowing visions to arise. Then Petrus says goodbye.
Paulo attends a secret ritual at the Castle of the Templars in Ponferrada, a medieval fortress built by the Knights Templar. He performs the Dance Exercise and sees a vision of a chalice and paten, the plate used to hold Eucharistic bread. An Australian pilgrim is initiated and receives his sword, but Paulo departs alone.
Discouraged, Paulo follows the guidebook Petrus left him. In Villafranca del Bierzo, generous strangers lead him to churches, asking nothing in return. Climbing the mountain of El Cebrero in dense fog, Paulo experiences a breakthrough: The secret of his sword is knowing what to do with it. He had always focused on finding the sword without asking why he wanted it. The purpose of any conquest matters more than the conquest itself.
At the peak, Paulo emerges above the fog. A lamb appears, which Paulo interprets as a divine sign, and guides him down to the hamlet of El Cebrero, site of a medieval miracle in which bread and wine literally transformed into the body and blood of Christ. In the small chapel where the miracle relics are preserved, Paulo finds his Master holding his sword. Outside, the Master recites a sacred psalm, touches the blade to Paulo's shoulders, and hands it to him. Rain falls for the first time on the entire journey.
In the epilogue, Paulo views the Cathedral of Santiago de Compostela from his hotel window. He plans to leave the scallop shells bearing the image of Our Lady of the Visitation at San Tiago's tomb and return to Brazil. He concludes that people always arrive at the right moment at the place where someone awaits them and considers writing a book about his experience, calling it a remote idea.