A musician who shot and killed three other Iranian men inside a New York City apartment before committing suicide was upset because he had been kicked out of an indie rock band, police said Monday.

NEW YORK — They said they sang in English instead of Farsi because they wanted their music to be heard by the world, but their secret performance space in Tehran was padded with Styrofoam so they wouldn't be arrested for playing forbidden music.

Their shows in Iran sometimes had lookouts, and the rockers had to ask fans to come but not to bring their friends, lest they attract too much attention.

In other words, they were as punk rock as punk rock gets.

But when the band known as the Yellow Dogs eventually fled Tehran to escape repression and claim their slice of indie glory in Brooklyn, tragedy followed.

Early Monday, two band members who were also brothers were among four musicians found dead in an apparent murder-suicide. The incident shocked friends and acquaintances in New York, where the band had built a following for their dance-happy brand of post-punk.

For unknown reasons, police said, an Iranian musician, Ali Akbar Mohammadi Rafie, 29, of Queens, took a rifle to the members' apartment in East Williamsburg, where police believe he entered from the roof.

Police said Rafie fatally shot Yellow Dogs guitarist Sourosh "Looloosh" Farazmand, 27, and drummer Arash Farazmand, 28, as well as fellow Iranian musician Ali Eskandarian, 35, who all appeared to be roommates. An unidentified 22-year-old man was wounded in the arm.

Rafie then turned the rifle on himself, authorities said. His body was found on the roof.

In a statement, the Yellow Dogs' manager, Ali Salehezadeh, disputed early news reports that Rafie had been a member of the group.

"He was in another band from Iran, and the two groups were acquaintances in the past," Salehezadeh said. "A personal conflict between the guys resulted in the dissolution of their relationship in 2012."

News of the musicians' deaths flashed around New York and beyond, with fans and fellow musicians hailing a group that was indebted to the 1970s dance-punk sound of English bands like Gang of Four and Joy Division.

"They didn't sound dated or like a nostalgia act," said Damon Campagna, a friend of a surviving band member. "They sounded fresh and energetic, which I suspect is due to the relative musical isolation of Iran compared to the avalanche of styles young musicians are exposed to here."

The Yellow Dogs fled Iran in 2010 after their music was featured on the soundtrack for "No One Knows About Persian Cats," a documentary about Iran's illegal rock scene that won an award at Cannes in 2009. A sample lyric: "Haagen-Dazs after McDonald's, there's a mind for sale. Uncle Sam's going to buy that thing.... We sold our souls to America."

The band rather fancied America, though.

"You want to be great engineer, you want to go to NASA from Iran, you study hard, try [to apply to] Harvard, Stanford. You want to go to that place where you can make progress," Siavash "Obash" Karampour, the group's dreadlocked singer, told Public Radio International in May. "New York City, and the scene here, was our Harvard University."

The band played the South by Southwest music festival in Austin, Texas, in 2010 and L.A.'s Culture Collide Festival in 2011. The group released its most recent album, an EP called "Upper Class Complexity," last spring, and played the Brooklyn Bowl on Oct. 23.

Eskandarian, the third victim, was born in Pensacola, Fla., but grew up in Iran and was the son of an Iranian air force officer, according to a biography posted on a promotional website for musicians.

"I was always around music," Eskandarian says in the bio, which details his family's flight from persecution in Iran to Germany and ultimately to America. "It's hard to find an Iranian party without dancing and singing. The Islamic revolution has not been successful in trying to stop people from having a good time."

Eskandarian, who had been in New York since 2003, was influenced by American folk music.

The shooter, Rafie, had been a member of the band Free Keys. In a Facebook profile under his name, he said he came from Tehran. Rafie was prone to cryptic Facebook updates, posting these Radiohead lyrics in September: