A man described as a member of a violent gang was arrested Wednesday and charged with murder in the death of a 10-year-old boy in Southern California, officials said. The boy, Anthony Avalos, had recently come out as gay, a county official said, and some suspect that homophobia played a role in his death.

Anthony Avalos was taken to a hospital on June 20 after his mother, Heather Barron, called 911 to report that he had been injured in a fall, according to the Los Angeles County Sheriff's Department. He was not breathing and unresponsive when emergency workers found him in his Lancaster home, and he died the next day.

Anthony Avalos

His body showed signs of physical abuse and malnutrition, child welfare workers said, and his death was classified as suspicious.

At a news conference on Wednesday, Sheriff Jim McDonnell said Barron's boyfriend, Kareem Leiva, 32, had been arrested on murder charges and was being held on $2 million bail. McDonnell said that while being interviewed, “Leiva made statements that led detectives to arrest him for the murder of Anthony Avalos.”

Before Leiva’s arrest, Brandon Nichols, deputy director of the Los Angeles County Department of Children and Family Services, told The Los Angeles Times that Anthony had “said he liked boys” in the weeks prior to his death. The department confirmed this detail to NBC Los Angeles but declined to provide additional details.

McDonnell declined to discuss a potential motive but he did tell reporters that homophobia “has not come up in our investigation as a motivation at this time.”

Anthony Avalos

However, Avalos’ uncle David Barron, the brother of Heather Barron and a co-worker of Leiva’s, told NBC News that Leiva has a history of homophobia. He recalled a number of times when Leiva said he was “uncomfortable just being around” gay men.

Caseworkers reportedly documented that Leiva was a member of MS-13, the criminal gang frequently mentioned by President Donald Trump during his immigration speeches. At least one branch of the gang, located in El Salvador, reportedly kills members found to be gay.

Before his death, Anthony had suffered years of physical, sexual and emotional abuse at the hands of family members, according to the Department of Children and Family Services. Caseworkers responded to 12 different complaints between February 2013 and April 2016, including sexual abuse by a grandparent when Anthony was 4, and general neglect.

“In private interviews, Anthony disclosed details consistent with media reports that he was beaten, locked up, and not fed,” Bobby Cagle, the director of the department, wrote in a statement shared with NBC News.

Anthony Avalos

Some of the complaints were substantiated, but others were unfounded or inconclusive, Cagle said. Anthony stayed with relatives from May to December 2014 while his family received in-home counseling, but he was eventually sent back home. Cagle said the last complaint regarding Anthony was in April 2016.

The department said eight children ranging in age from 11 months to 12 years old have been removed from the home of Barron and Leiva “pending further investigation.” They are now in the department's custody. It is not clear whether Barron will be charged in connection with her son's death.

Karla Avalos, one of the boy’s aunts, expressed frustration that Anthony and the other children were ever permitted to return to the home after being removed.

“I'm mad, because there was multiple reports done,” Karla Avalos told NBC News. “There were phone calls, and nobody did anything. I don’t know why they thought that was OK for them to go back with their mother.”

“What is wrong with the system?” she asked.

Anthony Avalos’ death bears a striking resemblance to a 2013 case in neighboring Palmdale, less than 10 minutes from Lancaster.

Gabriel Fernandez, who was routinely beaten, starved, forced to sleep in a closet and tortured until his 2013 death by his parents. NBC News

Eight-year-old Gabriel Fernandez died in May 2013 after being routinely beaten and starved by his mother and her boyfriend. Prosecutors said Gabriel was systematically abused because his mother’s boyfriend thought the boy was gay. Like Anthony, Gabriel was on the radar of the Department of Children and Family Services, though he was never removed from his home.

Gabriel’s mother, Pearl Sinthia Fernandez, pleaded guilty to first-degree murder in February and was sentenced earlier this month to life in prison without the possibility of parole. Her boyfriend, Isauro Aguirre, was sentenced to death earlier this month.

Los Angeles County Supervisor Sheila Kuehl told The Los Angeles Times that the possibility that both Anthony and Gabriel were targeted for being gay was particularly heartbreaking.

“I don’t think it’s a coincidence,” Kuehl told the paper. “I know that young people in my community every day find themselves at risk of violence.”

Lorri Jean, CEO of the Los Angeles LGBT Center, said her organization has been warning the county about the “unique problems that LGBT kids face.”

“This was a sad and tragic murder, but the tragic truth is that it was predictable,” Jean told NBC News. “If nothing is done, it won’t be the last.”

FOLLOW NBC OUT ON TWITTER, FACEBOOK AND INSTAGRAM