— Trey Parker looked completely strung out. He plopped his disheveled self down at a table in a midtown restaurant, strands of his hair arrayed like errant stems out of a wild arrangement.

“I’m exhausted,” he said. “I’m a broken man.”

Next to him sat his longtime “South Park” writing partner, Matt Stone. He seemed more on edge but also more alert. “The invited dress and first preview were just insane,” Stone said. “I was mortified during the first shows, I was so nervous. Rudin” — Scott Rudin, one of the producers — “told us, ‘Don’t pay attention to the reaction.’ But I wasn’t in a good space to be a critic of our own thing.”

The guys from the diabolical cartoon sensation were all twitchy because D-Day was approaching. Down the block from the restaurant where they’d stopped to chat for a bit that evening in mid-March was their baby, the new musical, “The Book of Mormon,” and in a few days’ time the critics would be filing in to the Eugene O’Neill Theatre to pass judgment.

The revelation at the table, where Stone gobbled up a plate of pasta and Parker sipped a soft drink, was that these two princes of irreverence — the shepherds of a long-running TV show whose guiding principle is that nothing, but nothing, is sacred — seemed in awe of Broadway. Yes, Broadway, the glittery realm of tap shoes and sequins that you’d think would be a bull’s-eye on their snark target: They dearly wanted to be a part of it, to feel the embrace of the birthplace of “Oklahoma!,” “Fiddler on the Roof” and “Hello, Dolly!”

Holy unlikely aspirations! The verdict, of course, is now in: The rhapsodic reviews for “Mormon” undoubtedly mean a long and prosperous life for their unbridled satire of organized religion. But still: Hearing these two talk so respectfully about Broadway is like the kid in class covered in tattoos and piercings whom you discover owns a stamp collection.

“I grew up loving musicals,” Parker confided.

“I get now why people get into this,” Stone added.

The successful beachhead established by the “South Park” boys is another sign of the opportunistic entertainment zone Broadway represents. That a show like “Book of Mormon” — which finds profane comic fodder in, among other things, missionaries, African poverty, “The Lion King,” Salt Lake City, Genghis Khan, “The King and I,” Johnny Cochran and “Star Trek” — can thrive a few blocks from “Mary Poppins” speaks to the ever-widening cultural swath of America on which Broadway has set its sights. (As Parker and Stone pointed out, the aisles of the theater are filled nightly with young men who are far, far better acquainted with how to find Comedy Central than the O’Neill.)

Hits of recent vintage such as “Avenue Q,” with its copulating puppets, and “The Producers,” which featured carrier pigeons in Nazi armbands, enthralled audiences while testing the boundaries of taste. In this regard, “The Book of Mormon” — which follows a pair of mismatched young missionaries sent by the church to Uganda — is the most adventurous musical yet. Though it makes fun of many things, its true satirical obsession is Mormonism, or more to the point, the stories and practices at the religion’s heart.

Dogma tied to faith of any kind, the musical’s creators seem to be saying, can be funny; their vehicle happens to be an example of it made in America. “It’s weird, because I was thinking of doing a Mormon musical before meeting them,” said Robert Lopez, the indispensable third leg of the “Mormon” writing triangle and one of the creative forces behind “Avenue Q.”

The three-way collaboration was a spooky convergence. “Avenue Q,” the 2004 Tony winner for best musical, was in a significant way inspired by Stone and Parker’s 1999 movie, “South Park: Bigger, Longer and Uncut.” “Quite literally after the ‘South Park’ movie came out, we got the idea for ‘Avenue Q,’ ” Lopez said. “It just kind of jarred something loose.”

The “Avenue Q” team had even thanked Parker and Stone in the Playbill, a tribute about which they knew nothing until they saw the show one night at the behest of Rudin, who produced the hilarious “Bigger, Longer and Uncut” and its less hilarious follow-up, the marionette movie “Team America: World Police.”

“Rudin told us there are these guys doing this puppet musical,” Parker recalled. “We went and really dug it.”

Meeting later with Lopez, the three found that though none of them is a Mormon, they shared a fascination with the religion. Parker and Stone grew up around it in Colorado, and Lopez was drawn to it because of a deep interest in religion and his own struggles with faith.

“I think many people who are religious have to come to some sense of ease with the tenets of their faith, and living in a modern society requires you to suspend your disbelief,” Lopez said, adding that he thinks it is possible to reconcile a church’s teachings and the realities of daily existence, “once you step away from the need for scripture to make logical sense.”

“The Book of Mormon” pokes fun at the confidence anyone might harbor in a literal interpretation of a genesis story — in this instance the tale of Mormonism’s founding in 19th-century America. Sprinkled throughout the evening is a series of reenactments that posit religion as the domain of men who are more deluded than holy. In presenting such provocative tableaux, the musical seems to be pursuing a wish — that everyone should just lighten up — that may be unattainable.

“People who are hard-line,” Lopez noted, “shouldn’t see it.”

Surprisingly, perhaps, the church has not taken a hard line against the show, at least not so far. Weeks before the musical’s formal opening, the Church of Jesus Christ of Latter-day Saints issued a statement in response to inquiries from the press: “The production may attempt to entertain audiences for an evening but the Book of Mormon as a volume of scripture will change people’s lives forever by bringing them closer to Christ,” the church said.

The reaction seemed to Stone a smart and dignified way to handle a comic treatment. “That’s exactly how a church should respond to criticism,” he said.

The writers — who are credited jointly for the book, music and lyrics — say they did their homework over the several years of rewrites and workshops needed to assemble the show. “We took a field trip to Salt Lake City,” Stone said. They also attended the church’s Hill Cumorah Pageant, an annual outdoor spectacular in Upstate New York. Parker added: “We also had to go and learn everything about missionaries, though we actually did take some liberties.”

In the days leading up to the performances designated for critics, the writers were attending every preview and coming up with things to tweak. Lopez, of course, had been through this process before. But even if they had been writing songs together for years in efforts like their jauntily slapdash early movie “Cannibal! The Musical” — and eventually garnered an Oscar nod for Best Song for the “South Park” film’s “Blame Canada” — Broadway was new, and proving to be grueling for Stone and Parker.

Even so, a trace of exhilaration was evident in their weary, anxious countenances. Stone seemed awestruck by how rapidly they’d been absorbed as Broadway players. And Parker wanted it known that no matter how much ribbing their musical subjected the church to, they have nothing but good things to say about the members themselves.

“They’re nice and kind and giving,” he observed. “We’ve yet to meet a Mormon we don’t like.”