Mark Evans, left, as missionary Elder Price and Derrick Williams as a Ugandan warlord in "The Book of Mormon." The national touring production plays the Hippodrome Feb. 25-March 9

Mark Evans, left, as missionary Elder Price and Derrick Williams as a Ugandan warlord in "The Book of Mormon." The national touring production plays the Hippodrome Feb. 25-March 9 (Joan Marcus, Handout)

Tim Smith, The Baltimore Sun

The curtain-raising scene of Jesus appearing "in ancient upstate New York" is the first little clue that "The Book of Mormon" is not your average Broadway musical. By the time the show ends, every politically incorrect button has been pushed, every doorbell rung.

With true missionary zeal, the creators of this hugely popular work, which reaches Baltimore on Tuesday, satirize not just one religion, but all of them. Various peoples, practices and conditions are heartily targeted in the process, too.

But when all is said, sung and stung, "Book of Mormon" is really a big, old-fashioned musical, one with the same basic structure that served Rodgers and Hammerstein so well.

Speaking of Rodgers and Hammerstein, they also come in for some ribbing (one production number suggests a parody of a scene from "The King and I"). For that matter, the whole show can be seen as sending up lots of Broadway, with "The Lion King" getting spoofed in a particularly rich manner.

That it all adds up to an unusually entertaining, wickedly funny experience helps explain how "The Book of Mormon" earned nine Tony Awards and has been going strong on Broadway since March 2011. It has been an equally hot touring property for the past two years.

The back story to the musical has a distinct air of inevitability about it. You might call it divinely preordained.

Robert Lopez, one of the show's creative trinity, developed a taste for musicals and satire early on.

"I was a devotee of 'The Simpsons' in middle school and all through high school," says Lopez, 38. "They really took the stuffing out of musicals — Madge as Blanche DuBois in the musical version of 'Streetcar Named Desire' was really something."

Later on, Lopez happened upon such inspired parody films as "This Is Spinal Tap" and "Waiting for Guffman," which also proved an influence. Then he discovered "South Park," the edgy animated series created by Trey Parker and Matt Stone.

When he saw "South Park: Bigger, Longer and Uncut," the 1999 musical number-filled cinematic extension of the TV series, Lopez realized that it was exactly the sort of thing he wanted to do. A week later, he hatched the idea that would be developed into "Avenue Q," a coolly subversive Broadway musical that opened in 2003 featuring puppets who were anything but childlike.

Now comes the spooky, serendipitous stuff.

Parker and Stone decided to check out the buzz-generating "Avenue Q" and noticed in the Playbill that Lopez thanked the two of them for their inspiration. But they didn't know Lopez. In short order, the three men met and learned that — cue the rumbling organ chords — they all shared a common interest in a certain faith.

"I had been wanting to write an epic musical about religion, one of the great subjects to tackle," Lopez says. "At first I was thinking of a sequel: 'The Bible, Part III.' But that had already been done by Joseph Smith, and it was called Book of Mormon."

Parker and Stone had also been thinking about building a project around Smith, who founded the Church of Jesus Christ of Latter-day Saints after he said he uncovered, in an upstate New York hillside, golden plates that detailed connections between Jesus and America in ancient times.

Deciding to collaborate on a Mormon musical, Parker, Lopez and Stone moved the focus away from Smith — his history would still be woven into the plot — and toward a couple of young Mormon missionaries sent off to proselytize. They are the totally prepared and dedicated Elder Price and the not-quite-ready, friendship-challenged Elder Cunningham.

For Lopez, all of this made perfect sense as a stage vehicle.

"I was raised somewhat Catholic and parted ways with it in college," he says. "But my job for extra money was singing in an Episcopal church choir, and I got to know the ritual of the Mass better. I saw how it was clearly related to musical theater — there's a story, songs, community feeling, trying to give people guidance. I don't feel it cheapens religion at all to say it's a kind of musical theater, musical theater at its best."

Musicals were not an interest for Christopher John O'Neill, who has played Elder Cunningham on the tour since late 2012. His background had been solely in comedy when, performing at the Edinburgh Fringe Festival a couple of years ago, he was spotted by a "Book of Mormon" casting director.

"All I knew about the show was how impossible it was to get tickets," O'Neill, 31, says, "and that it was by the guys who created 'South Park.' They sent me to see it in Los Angeles and, obviously, it was the best show I'd ever seen."

Another lapsed Catholic ("I just believe you should be a good person and everything will work out"), O'Neill had limited exposure to the musical's subject.

"I didn't know much about Mormons," the actor says. "I knew the stereotypes of Mormons riding bikes and ringing your doorbell. And I had one Mormon friend, and he was such a sweet, straight-laced guy. That was the only example I had."

When he was hired, O'Neill started reading the original Book of Mormon.

"It's like any scripture," he said. "You read certain things and wonder: How could anyone believe that? But every religion has crazy stories."

In preparing to write the musical, Parker, Lopez and Stone visited Utah to meet current and former missionaries and to Palmyra, N.Y., for the annual Mormon pageant featuring hundreds of performers.

"The set is permanently built into the side of the hill where Joseph Smith found the gold plates," Lopez says. "That festival is a work of musical theater, a great musical at heart."

The creators of "The Book of Mormon" knew they were risking a backlash. They didn't get much of one.

"We were all expecting a lot more outrage, and not just from Mormons," Lopez says. "I don't get a lot of hate mail. And, of course, Mormons usually don't take to the streets. Quite honestly, we didn't spend much time trying to make Mormons and what they believe look silly. We think a lot of it is crazy, but also endearing."

The fact that the Mormon church started placing ads in Playbill, inviting the curious to learn more about the religion, speaks volumes about how the faithful have handled the musical.

If "The Book of Mormon" told the story of missionaries pounding the pavement in pristine American suburbs, or even gritty inner cities, it would not have quite as explosive an impact. Instead, turning on a dime ("There is no slow build in this show; it starts at 100 miles an hour," O'Neill says), the plot suddenly whisks Elders Price and Cunningham to a pitiful spot in Africa.

"When the show was new, the greatest thing was that the audience didn't know they were going to Uganda," Lopez says. "It was very delightful to watch the effect on the audience. There will never be that surprise again. People know what to expect."

Even forewarned, the sudden shift in setting and atmosphere can still unsettle.

The villagers depicted in the musical are beyond downtrodden. In addition to poverty, AIDS and mistreatment of women, there is the constant threat of the local warlord, a character based on a real warlord, the man who called himself General Butt Naked and terrorized Liberia in the 1990s before finding religion. (In the musical, the character gets an unprintable addition to his name.)

"The challenge was not making fun of human suffering," says Lopez. "The idea was to highlight how religions justify believing in a righteous God, while suffering like this exists and has always existed. We tried to get as close as we could to a picture of a Godforsaken area. We put our First World audience in Third World Africa with the worst kind of human suffering and ask: How would you act?"

From the moment the musical moves to Uganda, everything gets edgier. And when the villagers sing their infectious anthem, "Hasa Diga Eebowai" — a made-up phrase that translates to an unprintable challenge to the heavens — the culture shock reaches levels detectable by the Richter scale.

Like the audience, Elders Price and Cunningham learn quickly what it means to be stuck in a hapless world. As the villagers tell them: "If you don't like what we say, try living here a couple days."

"I think it makes the audience uncomfortable," O'Neill says. "But once they get past that song, they take a deep breath and everyone is on board. People realize how much heart this show has. It's not just a show that drops the f-word, shocks you and leaves you unhappy at the end."

The musical's arc is not surprising. For all of the inspired envelope-pushing they did in this work, Parker, Lopez and Stone also brought to "The Book of Mormon" a strong respect for the traditions of vintage musical theater.

"We were following the formula closely for good reason," Lopez says. "When you want to challenge people, it's good to have something for them to hold onto. And when you're doing satire, it's good to have a form to satirize. It's harder to reinvent the form at the same time."

Lopez sees "a natural line" connecting shows like "Avenue Q" and "The Book of Mormon" to upbeat musicals that celebrate the "cockeyed optimist," as in "South Pacific."

"The musical theater is one of the few sects where that spirit remains," he says.

Even with the positive messages that emerge in "The Book of Mormon," messages that effectively encompass any faith (Parker once described the show as "an atheist's love letter to religion"), some people have been known to bristle.

Early on in the show's Broadway run, Lopez spotted "a woman who stood up and looked around, as if saying, 'We're all leaving, right?' She headed down the aisle and threw her Playbill in the garbage," he says. "We all thought that was great."

Traveling from state to state on the tour, O'Neill has detected little hostility from audiences.

"It sucks if they leave at intermission," he says. "They don't see where the show is going. People thought Texas would be difficult, but those were some of the best crowds. Every night is different. Sometimes people are more reserved at the beginning, but it's like a rock show at the end. We always win them over. The 95-year-old couple will be the first ones up and cheering."

"The Book of Mormon" opens Feb. 25 and runs through March 9 at the Hippodrome, 12 N. Eutaw St. Tickets are $30 to $180 (plus service fees). A lottery drawing for a limited number of $25 tickets will be held two hours before each performance. Call 410-547-7328 or go to ticketmaster.com.