Now the underground success of Muslim punk has resulted in a low-budget independent film based on the book.

A group of punk artists living in a communal house in Cleveland called the Tower of Treason offered the house as the set for the movie. The crumbling streets and boarded-up storefronts of their neighborhood resemble parts of Buffalo. Filming took place in October, and the movie will be released next year, said Eyad Zahra, the director.

“To see these characters that used to live only inside my head out here walking around, and to think of all these kids living out parts of the book, it’s totally surreal,” Mr. Muhammad Knight, 31, said as he roamed the movie set.

As part of the set, a Muslim punk rock musician, Marwan Kamel, 23, painted “Osama McDonald,” a figure with Osama bin Laden’s face atop Ronald McDonald’s body. Mr. Kamel said the painting was a protest against imperialism by American corporations and against Wahhabism, the strictest form of Islam.

Noureen DeWulf, 24, an actress who plays a rocker in the movie, defended the film’s message.

“I’m a Muslim and I’m 100-percent American,” Ms. DeWulf said, “so I can criticize my faith and my country. Rebellion? Punk? This is totally American.”