Springfield Elementary School is holding its medieval festival. All the students are given roles: Lisa is queen, Martin is king, and Bart is the cooper. Bart is mad about his role and is treated terribly by everyone, especially Lisa. Against his will, Groundskeeper Willie is chosen to play the village idiot, and seeking revenge for his cruel treatment, Willie unleashes a pie with hundreds of rats inside. Bart is blamed for this prank and is expelled from school. After looking through other schools, Marge decides to enroll Bart in St. Jerome's Catholic School. There, Bart's hip, rebel attitude is frowned upon.
While holding out two dictionaries as a punishment, Bart meets Father Sean (voiced by Liam Neeson), who converted to Catholicism after he was beaten by his father and St. Peter told him to repent. He is sympathetic to Bart and gives him a comic book about the saints and he is drawn into it. At home, Marge becomes concerned over Bart's interest in the Catholic Church, mainly due to the Catholic ban on birth control. Lisa incorrectly calls Latin 'the language of Plutarch (who actually wrote in Greek). Homer goes to the school to confront Father Sean, but reconsiders after having a pancake dinner and playing Bingo. After an expansive confession session (with Homer concluding that he has been "masturbating eight billion times" and "has no intention of stopping", which was a first for the series, since no character prior to this episode ever discussed such subject matter, due to fear of censorship). Homer decides to convert to Catholicism as well to be absolved of his sins (and that becoming a Catholic involves more than just wailing on Unitarians). With Bart and Homer both considering joining the Church, Marge (worried she might be alone in Protestant Heaven while Bart and Homer are in Catholic Heaven and Lisa possibly in Nirvana) seeks help from Rev. Lovejoy and Ned Flanders, who agree to get them back. While they are learning about First Communion, Marge, Lovejoy, and Ned capture Bart.
On the road, Marge, Ned and Lovejoy try bring Bart back to the "one true faith": The Western Branch of American Reform Presbylutheranism. Back at the house, Lisa agrees with Homer and Bart's desire to join a new faith. Even after getting laughed at for being Buddhist by Fr. Sean, she says that Marge is taking Bart to a Protestant Youth Festival. Homer and Fr. Sean then leave in hot pursuit. At the Festival, Marge fails to bribe Bart with the Christian rock of Quiet Riot (Pious Riot after their conversion). However, he agrees after he plays some paintball. Homer and Fr. Sean arrive with a motorcycle, shoot Marge's hair with some paintball bullets and engage in a Mexican standoff with Ned and Lovejoy. Bart says it is stupid that all the different forms of Christianity are feuding, explaining that the few stupid things they disagree on are nothing compared to the many stupid things they agree on. The two groups agree to both fight monogamist gays and stem cells and to take Bart's idea to heart. The episode then jumps 1,000 years into the future, when Bart is believed to be the last Prophet of God. In this age, mankind is waging war over whether Bart's teachings were about love and tolerance, or understanding and peace (and whether he was betrayed by his minion Milhouse and ripped apart by snowmobiles until he died). Unable to come to an agreement, one side cries Bart's catchphrase "Eat my shorts", the other cries "Cowabunga" and both sides engage in a bloody battle.