Police also say one of the suspects was responsible for another murder in 2009.
Three men and two women were found shot to death in the area of Wardlow Road and Santa Fe Avenue on Nov. 2, 2008. The bodies were found at least a day after the shooting after police received an anonymous tip. One of the victims was not homeless and was the mother of six children.
At the time, officers said there were no eyewitnesses, and they hadn't established a motive for the shooting deaths.
During a news conference, police announced that 31-year-old David Ponce and 25-year-old Max Rafael - alleged members of the Nuthood Watts criminal street gang - were responsible for the massacre.
Authorities say the killings were the result of an ongoing dispute between Ponzi and one of the victims, 44-year-old Lorenzo Villicana, over a drug debt.
Both Ponce and Rafael have been in custody for some time and are believed to be responsible for other murders in the Long Beach area and in Lancaster.
Police said the other four victims were innocent bystanders who were in the wrong place at the wrong time.
"These victims were not targeted because they were homeless," said Long Beach Police Chief Jim McDonnell.
Authorities say Ponce and Rafael have extensive criminal records. Each are charged with five special circumstance murders, and both will be arraigned by the end of the week.
The 2008 victims were identified as:
- Vanessa Malaepule, 34 of Carson
- Lorenzo Villicana, 44 of Long Beach
- Katherine Lynn Verdun, 24 of Long Beach
- Frederick Doyle Neumeier, 53 of Long Beach
- Hamid Shraifat, 41 of Signal Hill
The Associated Press contributed to this story.