WILLIAMSBURG — A musician furious over a long-simmering money dispute broke into the home of an Iranian indie rock band and opened fire on Monday, killing two band member brothers and their friend and wounding another man before turning the gun on himself, police and sources said.

Ali Ahkbar Mohammadi Rafie, 29, an Iranian immigrant who was a bassist for the band the Free Keys, had a falling out with the members of the Iranian band The Yellow Dogs last year over stolen money and equipment, sources said.

Just after midnight on Monday, Rafie climbed onto the roof of 318 Maujer St., near Morgan Avenue, where The Yellow Dogs lived and practiced. He leapt onto a third-floor landing and began shooting into the apartment using a Century Sporter .308 caliber rifle that he bought upstate in 2006, sources and an NYPD spokesman said.

the city View Full Caption The Yellow Dogs

Rafie first fired through a window, hitting Ali Eskandarian, 35, a fellow Iranian musician and author, police said.

Rafie, who lived in Maspeth, Queens, then climbed though the broken window into the building and continued firing on the third floor, fatally shooting the Yellow Dogs drummer Arash Farazmand, 28, in the head, police said.

Rafie then went to the second floor where he pointed his gun into a bedroom and shot The Yellow Dogs guitarist Sourosh Farazmand, 27, in the chest, police said.

He blasted several shots down a second-floor hallway, hitting 22-year-old Sasan Sadeghpourosko, police told reporters. Sadeghpourosko was taken to Elmhurst Hospital where he was treated for a gunshot wound to his arm and released, sources said.

Rafie returned to the third floor and sprayed bullets into the wall of a bedroom wall sublet by two tourists who were in town for the Veteran's Day parade, sources said. The tourists took refuge in a bathroom where Rafie fired at them but missed, sources said.

He then kicked in the bedroom's door and aimed his rifle at the Free Keys' frontman, Pooya Hosseini, who grabbed the weapon and fought off Rafie, he and police said.

"I was the last one to leave last night. We had a fight with Ali. With bare hands, with the gun," Hosseini told reporters later Monday, baring a cut across his face when he visited the 90th Precinct stationhouse.

After his struggle with Hosseini, Rafie dashed back up onto the roof and shot himself in the head, police said.

Initial reports incorrectly referred to Rafie as a former member of The Yellow Dogs, but the band's manager released a statement Monday afternoon clarifying that he was only a friend and fellow Iranian musicians, but had never been in the band.

"The shooter was not a former member of the band The Yellow Dogs, he was in another band from Iran and the two groups were acquaintances in the past. A personal conflict between the guys resulted in the dissolution of their relationship in 2012," the Yellow Dogs' manager said in a statement released to Pitchfork.

"The shooting resulted in the death of two of the members of the Yellow Dogs, Sourosh Farazmand (guitarist) and Arash Farazmand (drummer), along with a friend of theirs, fellow musician and author Ali Eskandarian. The shooter died from a self inflicted bullet wound on site."

The sad chapter was the latest in The Yellow Dogs' path. The band had moved to Brooklyn in 2010 after fleeing Iran because they feared they would be arrested for illegally performing their unsanctioned music in the country, according to their manager's website.

They became well-known on the underground music scene in Tehran and were featured in the 2009 documentary, "No One Knows About Persian Cats," which drew the unwanted attention of government authorities, the Huffington Post reported.

"Hanging out at a local park as teenagers, among skaters and punk rockers, they bonded over their mutual tastes and began playing together," the site continued.

Their music, which has been described as "dance-punk-psychadelic," was not sanctioned by Iran's Ministry of Culture, according to the Huffington Post.

The band had become a fixture of Williamsburg's music scene, regularly hosting boisterous parties at the Maujer Street address, neighbors and friends said.

"They were very inviting, fun to play with — very happy all the time," said a musician who had played with the Yellow Dogs but asked not to be named.

"They seemed to be happy not to be living in Tehran anymore and living the dream here. They partied a lot," he added. "They were fun guys."

"They're always playing music," said neighbor, Marcus Durant.

"It's pretty good stuff. They're normal kids. I'd always see them skateboarding up the block wearing the tight jeans."

With reporting by Trevor Bach and Meredith Hoffman.