NEW YORK (AP) — Members of a street gang who attacked a gay man and a recruit because they believed the two had a sexual encounter also turned on two of their own during the rampage, according to newly released court documents that say a pair of teens initially charged in the case were actually victims.

Bryan Almonte and Brian Cepeda, both 17, had been arrested along with nine others after the Oct. 3 attacks. Charges were later dropped against them and two others, whittling the number of defendants to seven.

Investigators say a group of men calling themselves the Latin King Goonies discovered one of their recruits was gay and had a sexual encounter with a man. The recruit, a 17-year-old, was beaten and sodomized at an abandoned apartment the crew used as a hangout, authorities said.

Later that day, gang members told the 30-year-old man, who was known throughout the neighborhood as “The Queen,” that they were having a party, authorities said. When he arrived, he was tied to a chair, burned, beaten, tortured and sodomized with a miniature baseball bat, police said.

Almonte and Cepeda had been accused of taking part in the assault. But Almonte’s attorney said the teen went to the apartment thinking it was just a party. When the assaults began, he tried to intercede and was attacked, attorney John O’Connell has said.

It’s not clear if Cepeda participated unwillingly in the attacks. His attorney didn’t return a call seeking comment.

According to an indictment released Wednesday, five of the seven remaining defendants were charged with third-degree assault as a hate crime for attacking Almonte. They were also charged with menacing as a hate crime for threatening Cepeda with pliers.

Charges have been dropped against Almonte, Cepeda, and Dennis Piters, all 17, and Steven Carabello, 16. Each had been charged with counts including robbery, gang assault and unlawful imprisonment.

It’s not clear if Piters and Carabello were also victimized. The Bronx District Attorney’s office refused to comment.

While the 30-year-old man was being attacked, gang members took his house keys, went to his home, beat his 40-year-old brother and stole a TV and cash, authorities said.

The men also attacked a second teen they suspected was gay who happened by the hangout because he had forgotten his backpack, investigators said.

Six of the remaining defendants have pleaded not guilty to 75 charges that also include sexual abuse, unlawful imprisonment and assault as hate crimes. Their attorneys and families insist they are innocent and are not members of a gang. They say that the suspects have not been allowed to tell their sides of the story and that the 30-year-old man was paying boys for sex. The age of consent in New York is 16.