A musician associated with an acclaimed indie band from Iran shot two members of the group and a third musician with an assault rifle in a Brooklyn apartment early Monday, before he went to the roof of the East Williamsburg building and turned the weapon on himself, law enforcement officials said.

UPDATE: Gunman Was "Despondent" Over Being Kicked Out of Band, Had 100 Rounds of Ammo

The two dead bandmates, 28-year-old Arash Farazmand and 27-year-old Soroush Farazmand, were members of the Yellow Dogs, a post-punk band from Tehran that moved to Brooklyn after appearing in a film about the underground music scene there, the group's manager, Ali Salehezadeh, said.

The third man killed, 35-year-old Ali Eskandarian, was a musician from Iran but was not in the band, according to Salehezadeh. A fourth shooting victim was shot twice in the arm but is expected to survive.

Police said the 29-year-old gunman, Ali Akbar Mohammed Rafie, was upset because he had been kicked out of another band, the Free Keys, last year. It wasn't immediately clear why Rafie opened fire on members of another band, although musicians in both groups knew each other and some lived in the same building, Salehezadeh said.

MORE COVERAGE: Mourning "Iran's Most Famous Indie Group:" Fans React to Murder-Suicide Involving The Yellow Dogs

Rafie knew his victims but he hadn't spoken to them in months because of a "very petty conflict," Salehezadeh said, declining to give specifics.

"There was a decision not to be around each other," he said. "They were never that close to begin with. ... This was nothing. We thought it was all behind us."

Law enforcement officials said the survivor called 911 shortly after midnight and reported the shooting at the three-story apartment building on Maujer Street.

Responding officers found the three dead victims on the second and third floors of one apartment; Eskandarian and Arash Farazmand had been shot in the head, and Soroush Farazmand had been shot in the chest.

Law enforcement officials said Rafie first started shooting from outside the apartment building, when he climbed down from the roof to a third-floor terrace and opened fire through a window, shooting Eskandarian in the head.

Rafie then shot Arash Farazmand in the head in a third-floor bedroom and Soroush Farazmand in the chest in a second-floor bedroom while he was on a bed using his laptop computer, police said.

An unidentified tenant was hit in the arm before Rafie and his former bandmate from Free Keys struggled over the gun until the clip fell out, police said. Rafie put the clip back in the rifle, went back to the roof and shot himself in the head.

Two other people were in the apartment at the time of the shooting, Police Commissioner Ray Kelly said. They were affiliated with the U.S. Coast Guard and were in town for the Veterans Day Parade.

Rafie's body was found on the roof of the building. Law enforcement officials say he shot himself in the chin, and the .308-caliber assault rifle used in the slayings was found next to his body. It wasn't clear how many shots had been fired.

Authorities were still sorting out the motive and relationship between the shooter and victims.

Kelly said the gun used in the slayings was manufactured out of the country and purchased in upstate New York in 2006.

The band came to the United States to pursue its dream of playing rock music in an open society, Salehezadeh said.

"You can't be a rock star in Iran," he said. "It's against cultural law. You can't grow there as a band." The manager added: "They were great kids who people just loved. They looked cool and they played great music. ... They wanted to be known for their music. Now we're not going to get to do that."

Salehezadeh spent the morning on the phone speaking to the victims' relatives, who were stunned by the violence. "People don't own guns in Iran," he said. "We don't have this problem there. It doesn't exist."

The band's video for "This City" is on YouTube: