NEW YORK – The profane and hysterical “The Book of Mormon” took home nine Tony Awards on Sunday including the prize for best musical, a considerable achievement for a pair of first-time Broadway playwrights known more for their raunchy cartoons featuring potty-mouthed kids.

Trey Parker and Matt Stone, creators of the Emmy Award-winning “South Park,” found a kindred soul in Robert Lopez, who co-wrote the Tony-winning “Avenue Q,” and all three found themselves with plenty of awards when they collaborated to gently mock Mormons and send-up Broadway itself.

Collecting the best musical prize, a subdued Parker, who tied Josh Logan of “South Pacific” with four Tonys in one evening – said he’d be remiss if he didn’t thank his late book co-writer – Joseph Smith, the founder of the Mormon religion.

“You did it, Joseph! You got the Tony!” Parker said looking skyward and holding up his award.

The show – which netted honors for best musical, best book, best direction of a musical, best score, best featured actress and four technical awards – had a leading 14 nominations and was the heavy favorite for the top musical prize.

“We know what the best musical is – it’s like taking a hooker to dinner,” comedian Chris Rock said before reading the nominees and announcing the winner.

“War Horse” – a World WarI tale about horses told with puppets and actors – won five Tonys, including the best prize award. The revival of “The Normal Heart” and “Anything Goes” both won three each.

Mark Rylance won the best acting award for a play for his powerful role of Johnny “Rooster” Byron in Jez Butterworth’s “Jerusalem.” Just as he did three years ago when he won for “Boeing-Boeing,” Rylance quoted a poem by Louis Jenkins, an obscure poet from Minnesota.

“Unlike flying or astral projection, walking through walls is a totally earth-related craft, but a lot more interesting than pot-making or driftwood lamps,” he said to the bemused crowd. When asked later why he had recited the poem, he said, “I don’t know. I was getting a little bored.”

Norbert Leo Butz won for best actor in a musical. Butz, who plays a frumpy FBI agent hot on the heels of a con man in “Catch Me If You Can” took home his second Tony. His previous win was in 2005 for “Dirty Rotten Scoundrels.”

Sutton Foster won for best actress in a musical and gave a tearful speech. “It doesn’t feel like a job,” she said of the Cole Porter musical “Anything Goes,” which also won best musical revival and earned Kathleen Marshall an award for best choreography.

Frances McDormand was declared the best leading actress in a play for portraying a South Boston blue-collar woman who reconnects with a high school boyfriend in David Lindsay-Abaire play “Good People.”

The best direction of a musical award went to Casey Nicholaw and Parker for “The Book of Mormon.” Parker – as well as co-writers Stone and Lopez – later returned to the stage to accept the Tony for the best book of a musical.

The top directing prize for a play went to Marianne Elliott and Tom Morris for the weepy British import “War Horse.”

“We quite like it when people cry,” Morris cracked backstage.

Nikki M. James, who plays a potential love interest to the pair of missionaries who travel to Uganda in “The Book of Mormon,” dedicated the award to her dad, who died while she was in high school, and to her nephew Ozzie, who was born with kidney problems.

The show is one of the hottest in town, and James said even cast members are having trouble getting tickets for their friends and family.

“It’s amazing to know you’re going to walk out there every night and know you’re going to see a house full of people,” she said.

Larry Kramer’s “The Normal Heart” won the best revival prize and two actors from the AIDS drama – Ellen Barkin and John Benjamin Hickey – also won. Barkin, making her Broadway debut, was declared the best actress in a featured role in a play, while Hickey took home the male equivalent honor.

THE WINNERS

Best play: “War Horse.”

Best musical: “The Book of Mormon.”

Best performance by an actor in a leading role in a play: Mark Rylance, “Jerusalem.”

Best performance by an actress in leading role in a play: Frances McDormand, “Good People.”

Best performance by an actress in a featured role in a play: Ellen Barkin, “The Normal Heart.”

Best performance by an actor in a featured role in a play: John Benjamin Hickey, “The Normal Heart.”

Best direction of a musical: Casey Nicholaw and Trey Parker, “The Book of Mormon.”

Best direction of a play: Marianne Elliott and Tom Morris, “War Horse.”

Best performance by an actor in a leading role in a musical: Norbert Leo Butz “Catch Me If You Can.”

Best performance by an actress in a leading role in a musical: Sutton Foster, “Anything Goes.”

Best performance by an actor in a featured role in a musical: John Larroquette, “How to Succeed in Business Without Really Trying.”

Best performance by an actress in a featured role in a musical: Nikki M. James, “The Book of Mormon.”

Best book of a musical: “The Book of Mormon.”

Best revival of a play: “The Normal Heart.”

Best revival of a musical: “Anything Goes.”

Best scenic design of a play: Rae Smith, “War Horse.”

Best scenic design of a musical: Scott Pask, “The Book of Mormon”

Best lighting design of a musical: Brian MacDevitt, “The Book of Mormon.”

Best lighting design of a play: Paule Constable, “War Horse.”

Best sound design of a musical: Brian Ronan, “The Book of Mormon.”

Best sound design of a play: Christopher Shutt, “War Horse.”

Best costume design of a play: Desmond Heeley, “The Importance of Being Earnest.”

Best costume design of a musical: Tim Chappel and Lizzy Gardiner, “Priscilla Queen of the Desert.”

Best orchestrations: Larry Hochman and Stephen Oremus, “The Book of Mormon.”

Best choreography: Kathleen Marshall, “Anything Goes.”

Best original score (music and/or lyrics) written for the theatre: Trey Parker, Robert Lopez, Matt Stone, “The Book of Mormon.”