BROOKLYN - A gunman who killed three Iranian indie rock musicians and injured a fourth before taking his own life in East Williamsburg was upset because he had been kicked out of another band last year, police say.

According to investigators, Ali Akbar Mahammadi Rafie shot and killed himself on the roof of 318 Maujer St. following a struggle with a member of his former band, the Free Keys. They believe the 29-year-old had an ongoing dispute with his victims, possibly over money.

Two of the victims were brothers and members of the band the Yellow Dogs. They have been identified as Arash Farazmand, 28, and Soroush Farazmand, 27. Police say Ali Eskandarian, 35, was also killed, and Sasan Sadeghpouroskou was shot in the arm, but is expected to be OK.

The victims were all found on the second and third floors of the house, while Rafie was discovered on the roof. Authorities say Rafie used a military-style assault rifle that was found next to his body and a guitar case, which may have been used to carry the weapon.

NYPD officials say Rafie was carrying about 100 rounds of ammunition in five magazines during the shooting. They say he used the same rifle to kill himself.

NYPD Commissioner Ray Kelly says it was not clear how Rafie acquired the Spanish-made assault weapon. He did say it was purchased in upstate New York in 2006.

The manager of the Yellow Dogs confirmed to the Associated Press that Rafie knew the victims, but hadn't spoken to them in months because of a conflict. He also said that the slain members were a guitarist and a drummer who recently received political asylum.

The bassist and singer for the Yellow Dogs were not home at the time of the shooting. The group had performed at the Cameo Gallery in Williamsburg just two weeks ago.