Composer Steven Lutvak was sitting up late one night when he was 18 years old, watching a black-and-white TV at the foot of his bed. He got up to turn the channel and tumbled into an old movie, “Kind Hearts and Coronets.”

As Lutvak remembers the story: “I smote my forehead and said to myself, ‘It’s a musical and it’s mine to write.’ It’s odd that all that came to me right then.”

Lutvak is 55 now so he clearly did not spring up the following morning and start noodling the tunes that would populate “A Gentleman’s Guide to Love and Murder.” The brashly funny musical won four 2014 Tonys, including best musical, and the national tour comes to the State Theatre in Minneapolis for a week starting Tuesday.

Lutvak was still harboring dreams of a pop career when he had that early epiphany, and he was still years away from meeting writer Robert Freedman at the Tisch School of the Arts at New York University. The two would become friends and form a long-lasting working partnership that has produced other work, but nothing so successful as “Gentleman’s Guide.”

The show almost did not come off because of a long legal nightmare to obtain the rights to adapt the film.

“A lot of people would have given up, and a lot of people thought we should have given up, even people we were close to,” said Freedman from his home in Sherman Oaks, Calif.

Ultimately, they quit pursuing the film rights and went to the original story — a 1907 novel by Roy Horniman called “Israel Rank: The Autobiography of a Criminal.”

“We decided that if the film company wanted nothing to do with us that we would erase everything from the movie and go to the book,” said Lutvak, who lives in New York. “The story got better, sharper.”

Freedman said the musical retains the tongue-in-cheek absurdity of the book but does so with slapstick that takes the edge off eight slayings. One actor plays all eight victims, for example.

“It was a conscious decision to make sure audiences weren’t repelled by the murders,” he said. “So we made the murders fun and we also made sure that the people who died were pretty loathsome.”

In other words, they needed killing.

Outsider and snobs

“Gentleman’s Guide” tells the story of an outsider, Monty Navarro, who by convoluted lineage finds he is heir to a magnificent estate. The only problem is that eight members of a snobbish family stand in his way. After even his most earnest entreaties are rejected by the family, Monty determines that he will kill his way to fortune. And in the bargain, he ends up with two women who love him.

For such a thorough cad to carry a show, Freedman and Lutvak had to make Monty an eminently charming underdog. This conceit has provoked many commentators to suggest the show is heavily about class.

“One thing we understood from the beginning was that you have to root for him,” said Freedman. “Roy Horniman was part of Oscar Wilde’s circle and they wrote a lot about the hypocrisy of the British class system.”

Any show that has dark comedy, killings and a British setting will inevitably draw comparisons to Stephen Sondheim’s “Sweeney Todd.” Lutvak suggests those comparisons not be driven too far. “Sweeney Todd” has comic elements but was intended as a serious work.

“I remember writing this piece of music [for “Gentleman’s Guide”] and we listened to it and decided it was too beautiful for our show,” Lutvak said. “Our show is a laugh-your-ass-off comedy. That’s why it’s has been successful.”

So as much as Lutvak loved that particular song, he realized he had to commit another murder and strike it from the show.

Lutvak describes himself as a student of Sondheim and lyricist Sheldon Harnick (“Fiddler on the Roof”), who is a big fan of the show. He studied with Leonard Bernstein at NYU.

“I’m a kid of the ’70s so I liked the singer/songwriters,” he said. “There’s some Joni Mitchell in some of what I write, Carole King is not far behind. Beatles, yes, always.”

Getting to Broadway

Even without the rights battle, “Gentleman’s Guide” took its time to get to Broadway. Freedman and Lutvak never lost heart because they sensed they had something. The show won a couple of prestigious awards (the Kleban and the Fred Ebb prizes) while still in development.

“One of the things that kept us going was the feeling that this was our best work,” said Freedman.

It opened at Hartford Stage in 2012 with director Darko Tresnjak and noted Broadway actor Jefferson Mays playing the revolving eight victims in a tour de force. It then went to the Old Globe in San Diego before launching on Broadway in the fall of 2013. The creators’ faith in their work was rewarded.

“It’s crazy and wonderful — to win a Tony for best musical is beyond my initial dream,” said Freedman, who is currently working on a film for HBO that Robert Redford is directing and producing.

“The story of how we got it to Broadway is a story that really gives people hope,” Lutvak said. “We did it under our own steam.”

And a little teenage inspiration from long ago.