Barry Levinson also reveals how Cat Stevens authorized the use of his music and what he thinks of the film.

Barry Levinson's new Bill Murray movie Rock the Kasbah is said to be inspired by true events. And while the main story that inspired the film is that of the real, first Pashtun woman to sing on Afghanistan's version of American Idol, Afghan Star, writer Mitch Glazer took inspiration from a number of real sources.

In the film, Murray, whom Glazer has written for many times over the past 40 years, plays a has-been music manager who takes his one remaining client (Zooey Deschanel) on a tour of Afghanistan. But when his singer bails, Murray's Richie Lanz stumbles across Pashtun singer Salima (Leem Lubany) and ends up managing her as she competes on Afghan Star.

To come up with the character of Richie Lanz, Glazer drew on his past as a rock journalist and his longtime friendship with Murray.

"The Bill Murray character's based on — I started out as a rock journalist … so I knew … Bill Graham and Irving Azoff … those guys. So some of the research was based on them but most of it was inspired by Bill [Murray], whom I've written for my whole life. And the combination is who Richie Lanz is," Glazer told The Hollywood Reporter at Monday night's New York premiere of Rock the Kasbah.

He incorporated other details from true stories into the script, including basing Danny McBride and Scott Caan's characters on a couple of arms dealers Glazer read about. Another detail came from his friend, and former Viacom CEO, Tom Freston.

"There's a club called L'Atmosphere in Kabul that Tom Freston, who's another friend, told me he'd seen, which was a French club in the middle of a Muslim city, with two or three levels…and a room in which you'd check your guns and once you got inside it was like a French disco," Glazer said. "I went, 'That's something interesting and I'd never seen before.'"

Much of the film takes place in war-torn Afghanistan, with Richie encountering a number of dangerous scenarios, including surviving being in a car that gets blown up.

Levinson, who previously took a light-hearted approach to the Vietnam War with Good Morning, Vietnam, said "it was a big challenge" to do a movie with comedic elements set against a serious backdrop.

"You don't want to do comedy for the sake of comedy. You don't want to push comedy…but you want to find that level where there's naturalistic aspects to it," Levinson told THR. "You're not trying to make fun of, you're simply being caught in situations of which you're trying to understand. And as the movie goes along, [Richie] gets a better understanding of the place and the people. And then he begins to make those connections…and find his own soul in a way. That's kind of the journey."

Glazer, meanwhile, sees the film as being the latest in a series of humorous war stories like M*A*S*H and Catch-22.

"I started to think when I began putting the thing together, seven or eight years ago, there's a history in film from The Great Dictator on…[of stories that] use humor or wit to deal with a horrific subject. It felt like kind of an honorable history to enter and with Bill Murray as your guide. You have the gift of good will and we are him in a way, so it felt like an accurate way and kind of an original way to deal with a horrific conflict."

Cat Stevens provides the music Salima sings, including songs like "Trouble" and "Wild World," and Levinson explained how the musician allowed the Rock the Kasbah team to use his songs and revealed what he thinks of the film.

"He was in New York because he was going to be inducted into the Rock and Roll Hall of Fame. We went and met him in a hotel," Levinson said. "He read the script. Mitch and I were there and we all talked. He liked what the movie was about and liked the script very much and ultimately allowed us to use the music. I just heard last week that he had seen the movie and he was just so pleased that it had turned out how he thought it would be. That was a wonderful moment for us."

The music-filled film attracted a number of stars from that world to its premiere at New York's AMC Lincoln Square on Monday night, including American Idol judge Jennifer Lopez, Fred Durst and Lady Gaga, who accompanied fiance Taylor Kinney, who appears in the film. Almost all of the film's star-studded cast was also there, including Kate Hudson, Bruce Willis, Deschanel, Caan and Murray, who dressed down after taping his appearance on Jimmy Kimmel Live.