AMHERST — Officials at the University of Massachusetts Amherst were reaching out to stunned students on Monday and assuring them of their safety after an 18-year-old woman reported being gang-raped in her dormitory room.

Four teenagers — Emmanuel Bile, 18; Justin King, 18; Adam Liccardi, 18; and Caleb Womack, 17, all of Pittsfield — pleaded not guilty Monday to charges of carrying out the attack during the early morning hours of Oct. 13.

“It was horrifying when I read that today,” sophomore Gwendolyn Crosby said Monday night, echoing the sentiments of others on campus.

Earlier in the day, UMass Amherst chancellor Kumble Subbaswamy wrote in an e-mail to students that campus police began an immediate ­investigation when the alleged attack was reported and determined that there was no security threat to the general campus.

Get Fast Forward in your inbox:

Forget yesterday's news. Get what you need today in this early-morning email.

The woman and the four defendants know one another, Subbaswamy wrote, but none of the suspects are UMass students. Officials would not identify the dormitory where the alleged sexual assault took place.

“Maintaining a safe learning and living community is of the utmost importance to our campus,” Subbaswamy said. “We will not tolerate this violent behavior and I can assure you that the UMass Amherst Police Department is working with the district attorney to ensure that the perpetrators in this case are brought to justice.”

At the arraignment of the four suspects Monday in Eastern Hampshire District Court in Belchertown, Assistant Northwestern District ­Attorney Jennifer Suhl provided a graphic ­account of the alleged assaults, drawing a shocked reaction from the judge.

Judge Mary Hurley set bail at $10,000 cash for each of the defendants and said, “Never in my time on the bench have I heard such an egregious recounting of facts.’’

According to Suhl, the men texted the woman before the encounter, saying they wanted to visit her dorm, and she ­replied that she did not want them to come. They went to Amherst, anyway, Suhl said, and were signed into the dormitory by a stranger. The woman was not in her room when the suspects ­entered the building, but they let themselves into her room when they discovered the door unlocked, according to Suhl. When the woman returned, she agreed to let the men stay and to socialize with them, Suhl said.

The men at one point shut off the lights and stripped the woman and then repeatedly raped her, according to Suhl. After the assaults, three of the men left the room; Liccardi stayed and raped the woman again, accord­ing to Suhl.

Defense attorneys fired back in court, saying the woman was inebriated and tried to extort money from their clients. Citing police reports, the lawyers said the woman told investigators that she drank eight or nine shots of liquor, a couple of beers, and smoked marijuana before the encounter.

According to both Suhl and the defense lawyers, the woman texted Bile the following day and accused the four of raping her. David Pixley, a lawyer for Bile, said the woman told his client in a text message that if they each paid her $500 cash, she would not report what they had done to police. Bile reportedly sent a text back, apologizing for his actions and those of his friends. Suhl said the woman was not blackmailing anyone, but was using a “safety tactic” to protect herself by misleading her attackers ­into believing she was willing to keep silent, as she sought help.

UMass Amherst Police Chief John Horvath said Monday that his department learned quickly about the alleged attack, but did not issue a campuswide alert because they saw no security threat on campus, given that none of the defendants are students at the university. He also said the news was not ­released sooner “for investigative purposes.”

“It’s a terrible incident, but the outcome, with the arrest of these individuals, is something that we’re very happy to see come to fruition,” he said in a telephone press conference.

It was not immediately clear Monday night if any of the men had posted bail. Liccardi works at a Papa Gino’s and King is employed at another restaurant, their lawyers said.

A lawyer for Womack, Raymond Jacoub, said it was unlikely his client’s family would be able to immediately come up with the funds.

This was the fourth report of a forcible rape on campus in 2012, compared with five such ­reports in 2011 and three in 2010, according to school officials and campus statistics.

The prior cases in 2012 were reported in February, March, and April, according to incident logs on the campus police website. An alleged rape that ­occurred in September 2011 was also reported in March. Three of the 2012 reports were listed as closed Monday and one was listed as pending. A UMass Amherst spokesman said Monday night that he had no details about those cases.

Maura Coyle, a UMass ­Amherst junior who works as a resident assistant at a campus dorm, said Monday night that she was unsettled by the news.

“This is definitely unnerving,” she said. “Not really knowing how [the defendants] got into the building, who signed them in, is a little frightening.”

Martin Finucane, Sarah ­Schweitzer, and John R. ­Ellement of the Globe staff contributed to this report. Travis Andersen can be reached at tandersen@globe.com.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.

Thanks & Welcome to Globe.com

You now have unlimited access for the next two weeks.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.