But for all its irreverence — and there’s enough off-color insouciance to offend church ladies of every denomination — “The Book of Mormon” has the old-fashioned musical comedy heart of adults who spent much of their adolescence lip-syncing to original cast albums in their finished basements.

These ostentatiously strait-laced lads, dressed like preppy penguins with not a strand of hair out of place, get this screwy musical satire off to a roaring start with a bouncy ensemble number that poses the proselytizing question “Did you know that Jesus Christ lived here in the USA?” The show, written by Trey Parker and Matt Stone, the creators of “South Park,” and Robert Lopez, one of the principal architects of “Avenue Q,” has all the fearlessness one would expect from the sort of guys who put the words “Bigger, Longer & Uncut” into a movie title and dreamed up an adult “Sesame Street” with sexually voracious puppets. Sacred cows, let’s just say, are there for the riotous milking.

If the sound of doorbells has ever provoked bigger guffaws in the theater, there must be some forgotten comedy gem about Avon ladies. But it’s hard to imagine anyone topping the ding-dong hilarity set off by the missionaries-in-training of “The Book of Mormon,” which had its Broadway opening Thursday at the Eugene O’Neill Theatre.

Co-directed by Parker and Casey Nicholaw (“The Drowsy Chaperone”), the production also has a slight earnest streak that may be easy to overlook once the action moves to Uganda and the AIDS jokes pile up, but it is detectable in the authors’ appreciation of the boldness and adaptability of religious imaginations. (Sociology 101 bullet points undergird the zaniness.) Oh, and rest assured, pious friends, that even in the heathen precincts of the Great White Way, faith works in mysterious ways.

All of which is to say that this boisterously outrageous show can feel at times oddly familiar. The laughter is steady but nostalgic, harking back to classic routines that have been refurbished with more daring expletives. Granted, it’s not easy to sustain a giddy level of hilarity over two full acts — even Aristophanes and the Marx Brothers hit stale patches. “The Book of Mormon” occasionally has that fresh-from-the-can, vitamin-enriched flavor, but it has a great compensatory weapon: the propulsive verve of a runaway hit.

Elder Price (Andrew Rannells) and Elder Cunningham (Josh Gad), two young men charged with rescuing the Mormon mission in Uganda from utter futility, are an odd couple of buddy-picture proportions. Price, the neat-as-a-pin golden boy, can hardly believe his luck. While the other missionaries are jetting off to European capitals, he’s being shipped off to a rough spot in Africa with the elder mostly like to embarrass the church. His dream of saving tourist souls at Epcot in Orlando is shattered, but ever ambitious, he decides this is an opportunity to make his mark.

A chubby mess with downright blasphemous curls, Cunningham is the perfect counterweight to Price’s superficial perfection. From his buzzer-like laugh to his slobbering joy at finally having a bosom companion, everything about him is inappropriate. But as in tragedies in which the hero’s virtues are undermined by a flaw, this comic doofus is redeemed by a vice. A knack for fiction — otherwise known as lying — will come in exceedingly handy in the uphill battle to bring the poor, suffering and, in at least one case, maggot-ridden villagers to the Church of Jesus Christ of Latter-Day Saints.

Africa — and the way it has been picturesquely or sentimentally represented in movies and the media — is a major source of ribbing. (“The Lion King” is parodied, like everything else, at once mercilessly and lovingly.) Nothing is off limits — not HIV, not female circumcision, not even the rape of babies by diseased men. Parker and Stone’s background in animated comedy is an asset in keeping the tone strictly cartoon. One moment of realism and the whole satiric house of cards might collapse. When a man gets shot in the face by a warlord, the blood spurs fear but not much suffering. The farcical stampede is unstoppable.

It’s not easy to shock a modern-day audience, but “The Book of Mormon” succeeds with alarming regularity, such as when the always-reliable Michael Potts, who plays community leader Mafala Hatimbi, teaches Price and Cunningham a native song that turns out to be an F-bomb to the Lord; the lyrics defy even euphemism. Mafala’s daughter, Nabulungi (the bright as a sunbeam Nikki M. James), is racing against the clock to save her — gulp — genitals. And the campy anthem of gay denial sung by Elder McKinley (a fantastically funny Rory O’Malley) pushes the envelope in a manner that, were it not so amusing, could foment angry protests.

But I found myself eventually acclimating to the profane absurdities and wondering how the faltering plot would eventually sort itself out. The first act goes out in a whimper, but the second, thank the Almighty above, is salvaged by a pageant in which the village converts recap all that they’ve learned from Cunningham to the Mission President (Lewis Cleale) and other visiting dignitaries. It’s a piece of stagecraft that needs to be seen to be believed, and if I attempted a synopsis I would likely be arrested for indecency. Not even the hobbits — you heard right — are chaste.

That said, “The Book of Mormon” survives more on its musical theater prowess than on its dirty-mindedness. The songs, often inspired lampoons of contemporary Broadway styles, are as catchy as they are clever. And Nicholaw’s vivacious choreography allows the numbers to gleefully bounce across Scott Pask’s winking sets.

Gad and Rannells subsume themselves in their caricatured parts. Humanizing the roles unduly would spoil the comic effect. “The Book of Mormon” is built for rougher pleasures. Sure it’s crass, but the show is not without good intentions and, in any case, vindicates itself with musical panache.

RELATED:

Critic's Notebook: 'Frankenstein' is endlessly, frighteningly relevant

'Little Miss Sunshine' musical sheds new light on family

Spring arts preview: Theater

--Charles McNulty

twitter.com\charlesmcnulty

Photos: Top: Rema Webb, Andrew Rannells and Josh Gad perform in "The Book of Mormon" at the Eugene O'Neill Theatre in New York. Bottom: Rannells. Credit AP Photo/Boneau/Bryan-Brown, Joan Marcus.