Gunman was a member of another band from Iran, who knew the victims but had not spoken to them in months because of a 'petty conflict'

A musician shot dead two members of a New York-based Iranian indie rock band and another musician on Monday, according to police and the group’s manager.

Two of the victims played in The Yellow Dogs, a Brooklyn-based rock band that had moved to New York from Tehran. The third man who died was also a musician but did not play in the band. A fourth man, said to be an artist, was wounded.

Initial reports said the gunman was a former member of the band who had been kicked out. But the manager of The Yellow Dogs, Ali Salehezadeh, told the Associated Press that he was a member of another band from Iran, the Free Keys, who knew the victims but had not spoken to them in months because of a "petty conflict".

The shootings happened just after midnight in the East Williamsburg neighbourhood of Brooklyn. When police arrived at the scene, they found a 27-year-old man with a gunshot wound to the chest on the second floor, and a 35-year-old man with a gunshot wound to the head on the third floor. Both were dead. Another man was found on the same floor with a fatal gunshot wound to the head. His age was not immediately known.

A 22-year-old member of the band was wounded in the arm and was in a stable condition in hospital, according to the Associated Press.

The gunman was found on the roof with a self-inflicted gunshot wound to the head, police said. A rifle was found next to his body. New York police commissioner Ray Kelly told the AP that the gunman opened fire through a window, then went inside and continued firing.

The street where the shooting took place was cordoned off on Monday morning. A forensic team could be seen on the roof of the three-storey house the band were said to share. A police officer said the bodies were yet to be removed from the scene.

Williamsburg is popular with musicians and artists, although the area where the shooting took place is more industrial, with fewer homes and more warehouses.

Elless Domingo, 25, said he was visiting New York from Honolulu, Hawaii. He had arrived in the city on Sunday and was staying in an apartment with his girlfriend across the street from the shooting. "When we were walking home last night we both heard one gunshot," Domingo said. He said he heard the shot between 11.30pm and midnight. "Fifteen to 20 minutes after the first, I heard another shot," he said.

Domingo said later he could see a Swat team on the roof of the building across the street. Armed police also went up to the roof of his building, he said.

The Yellow Dogs had moved to New York from Tehran, Iran. Their Facebook page said they were founded in 2006 and described their genre as "pschedelic/dance – post punk". The band had recently played gigs at Williamsburg institutions including Brooklyn Bowl and Knitting Factory.

Maria Rodriguez, 50, has worked in Freddy's Deli, a block away from where the shooting took place, for 20 years. She said she was “speechless" at the news. "It's quiet, very quiet,” she said of the neighbourhood. “Especially at night time.”