A state appeals court recently chided a New Jersey judge who last year ruled to keep a teenager — accused of sexually assaulting a girl at a pajama party and filming it — in the juvenile system, at one point citing the boy’s “good family,” high test scores, and status as an Eagle Scout.

In denying Monmouth County prosecutors’ request to move the case to adult court, Family Court Judge James G. Troiano also differentiated the alleged assault from a “traditional case of rape,” which he described as “generally two or more” males using a weapon and “clearly manhandling a person” into an “abandoned” area.

In reversing that decision last month, the appellate court wrote that Troiano “sounded as if he had conducted a bench trial on the charges" rather than simply reviewing the state’s application to transfer the case.

Now, prosecutors will present the case to a grand jury and want to prosecute the teen — who hasn’t been publicly identified — in New Jersey’s adult system.

The appellate court’s opinion is the second time within the last three weeks that it reversed a Family Court decision meant to keep a teenager accused of sexual assault in the juvenile system. In both cases — the other involves a Middlesex County decision — the appeals court ruled that the lower court judge overstepped in weighing the merits of the case, rather than judging the validity of the prosecutors’ request to move the case to adult court.

The cases were first reported by New Jersey 101.5 in a story examining a bill that could give lower court judges more discretion in deciding “juvenile waiver” cases, which opponents say could make it harder for prosecutors to win similar appeals in the future.

In the Middlesex County case, the appeals court in mid-June reversed a decision in which Judge Marcia Silva blocked prosecutors’ request to move a teenager, accused of sexually assaulting a 12-year-old girl when he was 16, to adult court. In making her decision, Silva said that “the victim did not suffer any physical or emotional injuries as a result, other than the ramifications of losing her virginity, which the court does not find to be especially serious harm in this case.”

Prosecutors said the girl told police the accused “removed her clothing, grabbed her hands, and while wearing a condom, penetrated her with force.” She told investigators that she said “no” repeatedly and that the assault caused her to bleed.

The defendant, who hasn’t been publicly identified, is detained in the Juvenile Detention Center pending a detention hearing in adult court, according to a Middlesex County prosecutor’s spokesperson. His defense attorney didn’t respond to a request for comment.

Troiano declined to comment through a spokesperson, and Silva couldn’t be reached for comment.

On Wednesday, New Jersey Senate Majority Leader Loretta Weinberg called for both judges to be removed from their seats, saying in a statement that the “comments are appalling and having two cases like this is cause for grave concern in the state of New Jersey." In a statement, the Democrat also urged “additional corrective measures” and floated the idea of requiring training for judges who manage cases of sexual assault.

Middlesex County Prosecutor Andrew C. Carey said in a statement that most cases involving juveniles are resolved in school or Family Court. But "in a very small amount of cases, the right thing to do is to file a motion to waive a juvenile up to adult court.”

Fewer than 10 percent of the 500 juveniles currently in the New Jersey system were waived for adult court, according to the Juvenile Justice Commission of the state attorney general.

Under New Jersey state law, prosecutors can only seek waivers to send juveniles to the adult system in cases of especially heinous accused crimes, like murder and aggravated sexual assault. (There is no specific statute for rape in the state.) The juvenile must have been at least 15 at the time of the incident, and prosecutors must show probable cause exists that a violent crime was committed. To deny such a request, a judge must determine that a prosecutor “abused his discretion.”

Monmouth County Prosecutor Christopher J. Gramiccioni said that in the case involving the 16-year-old accused of sexually assaulting a girl at a pajama party, “the guy videotaped it and sent it to all of his friends.” Investigators said the teen also texted his friends in the days following the incident: “[w]hen your first time having sex was rape.”

The girl was described by prosecutors as visibly intoxicated and “was on the floor vomiting” after the incident. The next morning, she found bruises on her body and her clothing was torn, and she told her mother what she feared had happened, prompting a report to police.

The teenager’s attorney didn’t respond to a request for comment.

According to the appellate courts, the judge had expressed concern that prosecutors hadn’t explained to the accuser and her mother the effect that moving the boy to adult court would have on his life.

“This young man comes from a good family, who put him into an excellent school where he was doing extremely well,” Troiano said, according to the appellate court opinion. “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 also detailed the boy’s extracurricular activities, including noting that he is an Eagle Scout.

Gramiccioni said that while he respects Troiano, a retired judge who was recalled to the bench in an effort to alleviate caseloads, he’s satisfied with the appellate court decision.

But there’s some concern among prosecutors that they won’t win appeals like this in the future if legislation is enacted aimed at providing lower court judges more discretion. The proposed legislation would allow Family Court judges to rule against prosecutors if they determine the interests of the juvenile outweigh the interests of the public.

State Sen. Troy Singleton (D., Burlington), who introduced the legislation, said in a statement that it is meant to “address the very real problems associated with incarcerating minors in the adult prison population.”

Studies have repeatedly showed juveniles transferred to the adult system are more likely to commit later crimes and face more long-term developmental problems compared to their counterparts kept in the juvenile system.