Game of Thrones‘ fifth season has introduced the Faith Militant – otherwise known as The Sparrows – a cult that George R. R. Martin created with religious history in mind.

Game Of Thrones’ Sparrows & Medieval Religion

At the start of the current season, Cersei’s (Lena Headey) cousin Lancel (Eugene Simon) returns to King’s Landing as one of The Sparrows, a group of devout men and women, who serve The Seven. In an effort to instill their strict faith in the masses, they’re willing to use any means, including corporeal violence. At their head is the High Sparrow, played by Jonathan Pryce.

In Game of Throneslast episode, “The Gift,” after working alongside of Cersei, through whom he achieved his Faith Militant position, the High Sparrow speaks to Lady Olenna Tyrell. Olenna calls him out for being a hypocrite for doing Cersei’s dirty work, and he quickly dismisses her. However, before the episode was over, the High Sparrow made a shocking move by locking Cersei up for her past affair with Lancel.

“The Sparrows are my version of the medieval Catholic Church, with its own fantasy twist,” Martin explained to Entertainment Weekly. “If you look at the history of the church in the Middle Ages, you had periods where you had very worldly and corrupt popes and bishops. People who were not spiritual, but were politicians. They were playing their own version of the game of thrones, and they were in bed with the kings and the lords.”

“You also had periods of religious revival or reform—the greatest of them being the Protestant Reformation, which led to the splitting of the church—where there were two or three rival popes each denouncing the other as legitimate,” Martin continued. “That’s what you’re seeing here in Westeros.”

In addition to inspiring the idea behind The Sparrows and what they represent in Westeros, the Catholic Church also helped Martin conceptualize a broader aspect of the Faith of the Seven. Martin pointed out that the idea of having one god with multiple aspects was something he drew from the religion.

“Instead of the Trinity of the Catholic Church, you have the Seven, where there is one god with seven aspects. In Catholicism, you have three aspects—the Father, the Son and the Holy Ghost,” the author said. “I remember as a kid, I was always confused by that. ‘So there are three gods?’ No, one god, but with three aspects. I was still confused: ‘So he’s his own father and own son?'”

Game of Thrones airs on HBO Sundays at 9/8c.