Many years before the events in The Exorcist, the young Father Lankester Merrin (played by Skarsgård, who played the same part in The Beginning) travels to East Africa. Merrin has taken a sabbatical from the Church and devoted himself to history and archaeology as he struggles with his shattered faith. He is haunted especially by an incident in a small village in occupied Holland during World War II, where he served as parish priest. Near the end of the war, a sadistic Nazi SS commander, in retaliation for the murder of a German trooper, forces Merrin to participate in arbitrary executions in order to save a full village from slaughter.
He meets up with a team of archaeologists, who are seeking to unearth a church that they believe has been buried for centuries. At first, Merrin resists the idea that supernatural forces are in play, but eventually helps them, and the ensuing events result in an encounter with Pazuzu, the same demon referenced in The Exorcist.