A man who admitted looking on and masturbating while two acquaintances repeatedly raped a 14-year-old intoxicated and drugged girl in a Cambridge hallway lost his appeal to the Supreme Judicial Court on Wednesday. The defendant, James L. Adams, had been convicted of acting with the two others to rape the victim.

The assault occurred April 5, 2011, in a narrow, unlit hallway at 929 Massachusetts Ave. near Central Square, according to evidence summarized in court decisions. The teenage victim, a residential psychiatric patient at McLean Hospital in Belmont, got permission to travel to Boston to see a private tutor for a Portuguese lesson, but didn’t keep the appointment and intended to visit the city to buy drugs, according to court documents.

She ended up at The Pit in Harvard Square, where she met James, Calvin Spencer, Joseph L. Brown and a fourth man who was not involved in the rape. They took a bus to a location near Central Square, where the victim got off with James, Spencer and Brown. She had shared liquor provided by the men, and began to feel “lightheaded and dizzy,” the SJC decision said.

The victim, who weighed about 110 to 120 pounds, ended up with the three men in the dark hallway at 929 Massachusetts Ave. after sneaking into the locked entrance when someone left. They smoked marijuana and one man gave the victim a pill of the painkiller Percocet.

The victim passed out and woke up without most of her clothing to find that she was being raped orally, vaginally and anally, according to testimony. She periodically lost consciousness and could hardly move, testifying that the men changed her position and two raped her at once. After 30 minutes the rapes stopped and the men helped her put on her clothing and leave the building. Adams walked her to the Central Square subway stop, where she rode to Harvard Square and summoned help from McLean to return to the hospital, according to court documents.

Charges and trials

Adams and Brown were charged with raping the victim directly and as part of a joint venture to commit rape. Details about charges against Spencer and the outcome could not be obtained Wednesday.

The victim couldn’t specify exactly which man raped her in which way. At the trial in Middlesex Superior Court, Adams was acquitted of directly raping her and of working with the others to assault her orally. The jury couldn’t reach a decision on four counts of helping the others to rape her vaginally and anally. He was convicted of contributing to the delinquency of a minor.

At his second trial, Adams was convicted of the four joint-venture rape charges that had previously resulted in a hung jury. He appealed, arguing that he was being tried twice for the same crime since the first jury had decided he was not a joint venturer in the assault. He also claimed the court had wrongly allowed new DNA evidence suggesting that he had directly raped the victim when he had been found innocent of those charges.

New court findings

The SJC rejected the double-jeopardy argument, ruling that a hung jury on some of the joint-venture rape charges together with acquittal on the others didn’t mean jurors had decided he wasn’t guilty of being a joint-venturer. Justices agreed that the new DNA evidence shouldn’t have been presented, but ruled that it didn’t affect the verdict in the second trial.

After the second trial, Adams was sentenced to eight to 12 years in prison and five years of probation, plus a one-year concurrent sentence for contributing to the delinquency of a minor.

Brown was convicted of six counts of helping to assault the victim and acquitted of two charges of directly raping her. The jury couldn’t decide on one direct rape count.

Like Adams, he had claimed that he merely watched the assault and masturbated.

Brown’s appeal was rejected by the Appeals Court. Prosecutors decided not to retry him on the rape count that resulted in a hung jury. Information about his sentence wasn’t available. The outcome in Spencer’s case couldn’t be obtained from court documents Wednesday.