Iranian expatriates across the United States were reeling on Monday at the news that three Iranian indie rock musicians were shot to death in Brooklyn, New York, early in the morning. They were apparently killed by a fellow expatriate Iranian musician who then took his own life, according to reports from police and acquaintances.

Police said they responded shortly after midnight to reports of gunshots in a multistory house in East Williamsburg, Brooklyn, a warehouse area where many artists and musicians live. Three men, who were residents of the house, were found there with fatal gunshot wounds and one, the suspect, was found on the roof with a self-inflicted gunshot wound to the head and a rifle beside him, police said. A fifth man, who is 25, was found in the house with gunshot wounds to the arm and was hospitalized.

The police identified the victims as Soroush Farazmand, 27, and his brother Arash Farazmand, 28, and Ali Eskandarian, 35. Friends said the brothers belonged to the band The Yellow Dogs, which was featured in a 2009 documentary about the Iranian underground rock scene. They were part of a wave of musicians who fled Iran after a 2009 political crackdown there. Eskandarian was an Iranian-American musician and writer who was friends with the band.

Police identified the suspect as Ali Akbar Mohammadi Rafie, 29, of Queens, and said he was formerly a member of a band called The Freakies, whose members shared a house with the victims.

“It looks like he got kicked out of this band, The Freakies, last year... and they wouldn’t let him back in,” said New York police Lt. John Grimpel, adding that Mohammadi Rafie had had no prior confrontations with police. Fans of the band spelled its name as the Free Keys.

Grimpel said the suspect entered the house from a third-floor terrace that was accessible from other buildings, and that he may have carried his weapon in a “guitar-type case” that was later found on the roof of an adjacent building. He said another member of the Free Keys tried to grab the gun from the suspect, during which several rounds were fired and the magazine became ejected from the gun. That man was not injured, Grimpel said.

Throughout the day, Iranians’ Twitter and Facebook accounts buzzed with shock and horror. The Yellow Dogs, who were featured in the film “No One Knows About Persian Cats,” were part of a close-knit group of rock musicians in their 20s and 30s who knew each other in Iran and had moved to the U.S. in the past five years.

“They really embraced Brooklyn and all it had to offer, compared to being in Iran and having to hide and not be found by authorities,” said Piruz Partow, an Iranian-American musician who is executive director of the Brooklyn Music School and was an acquaintance of the band members.

The killings were shocking in part because they did not fit with Iranian culture, Partow said. “We’re all a bunch of drama queens, especially as far as musicians and artists are concerned…but nobody pulls a gun, violence, that type of thing.”

Pourang Jahanshahi, a Brooklyn-based Iranian-American who described himself as a friend and a fan of the group, said the killings were a blow to musicians and artists still in Iran, where they face harsh restrictions on performing or even rehearsing.

“So many people had their eyes on them and were looking to them as a role model,” he said. Coming here, “they had a chance to be cool, they had a chance to have an audience and be free. It’s disheartening to think of how [people in Iran] are taking this.”

Arash Sobhani, a singer and songwriter with the Iranian band Kiosk, now based in North America, said he and other Iranians worry that the Iranian authorities will seize on the killing as evidence of the dangers of living in the West.

“The worry is that they’re going to milk it, that this is what going out of the country does, and that Western influence does this to people,” he said.