When a 16-year-old New Jersey boy was accused of raping an intoxicated girl, filming the assault and sending the video to his friends, the prosecutors sought to try him as an adult.

But a state Superior Court judge shot down that request in part because, the judge said, the boy "comes from a good family" and is destined "for a good college."

Now a state appeals court has overturned the decision and warned the judge against showing leniency to juveniles of privilege, raising the question of what such judicial reasoning would mean for "juveniles who do not come from good families and do not have good test scores."

Prosecutors can now seek an indictment on charges they choose to pursue against the teen, who would be tried as an adult. Monmouth County Prosecutor Christopher J. Gramiccioni said in a statement released Wednesday that he was "grateful" for the appeals court decision, and "assessing our next steps, which will include discussions with the victim and her family."

The suspect, identified in court papers only as G.M.C., in 2017 filmed himself with a girl, "Mary," who was also 16 at the time, in a closed-off, dark basement and then sent the clip to friends with a text: "[w]hen your first time having sex was rape," according to the appeals court ruling.

Mary and G.M.C. were at a "pajama-themed" party, and both teens were drunk when G.M.C. allegedly led her to a basement sofa, according to the ruling by the appeals court. "Her speech was slurred, and she stumbled as she walked," the ruling said.

"While on the sofa, a group of boys sprayed Febreze on Mary's bottom and slapped it with such force that the following day she had hand marks on her buttocks," the ruling said.

G.M.C. then penetrated Mary from behind in a home-gym portion of the basement. In the video he sent to seven friends, her torso is exposed, and her head is hanging down. One of the friends said that the video showed Mary's head hitting the wall repeatedly.

Prosecutors said that during the assault, the door to the gym was blocked by a foosball table, and the lights were off.

"[G.M.C.'s] conduct as it relates to the charged offenses was both sophisticated and predatory. He was aware of the off-limits areas in advance of the party," prosecutors said, adding that "filming a cellphone video while committing the assault was a deliberate act of debasement."

Following the alleged assault, others at the party checked on Mary and found her on the floor vomiting.

She was driven home by a friend's mother, and told her mother the next morning that she feared "sexual things had happened at the party," the appeals court ruling said. "She did not understand how she could have gotten bruise marks on her body or how her clothing had torn."

She then learned that G.M.C. was sending the video of the assault to his friends, and asked him to stop. When he didn't, her family pressed charges.

Prosecutors in New Jersey can seek to send a juvenile case to adult court for serious crimes, including sexual assault, if the accused is 15 or older.

If Judge James Troiano, serving in the family court division, had decided to charge G.M.C. as an adult, as the Monmouth County Prosecutor's Office requested, the teen would have faced counts of first-degree aggravated sexual assault, second-degree sexual assault, third-degree endangering the welfare of a child, and two counts of third-degree invasion of privacy. He would have had to register as a sex offender.

But in a July 30, 2018, decision, Troiano, who is now 69, denied the prosecutors' request.

The "young man comes from a good family who put him into an excellent school where he was doing extremely well. He is clearly a candidate for not just college but probably for a good college. His scores for college entry were very high," the judge said, noting also that G.M.C. was an Eagle Scout.

Troiano also "expressed concern that the prosecutor did not indicate ... that she had explained to Mary and her mother the devastating effect" adult charges would have on G.M.C.'s life, the appeals court ruling said.

The judge said he questioned Mary's claimed state of intoxication at the time of the assault.

"Some people would argue that, you know ... how could she possibly have gotten as drunk as she says she was?" the judge asked. "That's really not important. I think it's an issue here, whether or not this young lady was intoxicated to the point that she didn't understand what was going on."

And he wondered whether G.M.C.'s actions could be classified as a rape, saying he distinguishes between sexual assault and rape.

"In my mind," Troiano said, a rape is "where there were generally two or more generally males involved, either at gunpoint or weapon, clearly manhandling a person into ... an area where ... there was nobody around, sometime in an abandon[ed] house, sometimes in an abandon[ed] shed, shack, and just simply taking advantage of the person as well as beating the person, threatening the person."

Troiano added that G.M.C.'s text calling the encounter a rape was "to me, just a 16-year-old boy saying stupid crap to his friends."

"[D]o I believe that it shows in any way a calculation or cruelty on his part or sophistication or a predatory nature? No, I do not," Troiano said.

But the appeals court said prosecutors at least proved that "the delinquent act in question, if committed by an adult in this case, would have been aggravated sexual assault and sexual assault," which would allow for the case to go to adult court.

"Rather than focusing on whether the prosecutor's consideration of the statutory factors supported the application, the judge decided the case for himself," the appeals court decision said.

"That the juvenile came from a good family and had good test scores we assume would not" spare "the juveniles who do not come from good families and do not have good test scores" from adult court, the ruling said.

Sen. Kirsten Gillibrand of New York, who is running for president, weighed in on the decision Wednesday. "I don’t care what kind of family you’re from — sexual assault is never acceptable," she wrote on Twitter. "Stop making excuses for perpetrators and start standing up for those who've been violated."

"Our kids don’t need to be coddled. They need to be taught not to rape," she said.

Anna Martinez, the acting director of New Jersey’s Division on Women, also rebuked the judge's decision.

The "‘boys being boys’ mentality that excuses incredibly heinous crimes and treats offenders to a slap on the wrist, rather than true accountability" is "unconscionable," Martinez said in a statement. "When it comes from a sitting member of the judiciary, it’s inconceivable."

"Dismissing these traumas with platitudes for an offender’s academic record, rather than in the interest of justice for the victims, is reprehensible," she added.

G.M.C.'s attorney, Mitchell J. Ansell, did not immediately respond to a request for comment.

Three days after the ruling on Troiano's decision, the New Jersey appeals court reversed a decision by another state family court judge, Marcia Silva of Middlesex County, against having a 16-year-old accused of raping a 12-year-old charged in adult court.

Silva argued that the alleged victim and the 16-year-old were the only witnesses, and “there is little, if any, tangible evidence.”

“The judge went on to say that even if this 12-year-old's statement was true, the offense is not an especially heinous or cruel offense,” the appeals court said.

“Beyond losing her virginity," Silva said of the 12-year-old, prosecutors did not claim that she "suffered any further injuries, either physical, mental or emotional.”

But the appeals court ruled that the 16-year-old was culpable, even if the victim had not said “no” — as prosecutors said she had — because she was 12 at the time of the alleged assault.

“It was not the judge's role to essentially try the matter or substitute her judgment for that of the prosecutor,” the appeals court said in the decision.

Peter McAleer, the director of communications and community relations for New Jersey Courts, said neither Troiano or Silva were commenting on the cases. He said Troiano is retired, but still serves periodically.