Federal immigration officials are requesting detainers on four illegal aliens accused of a heinous attack on a Framingham couple in which the woman was raped and her boyfriend was beaten and threatened with death, the Herald has learned.

Two of the illegals had previously been deported to Guatemala, said Immigration and ?Customs Enforcement spokesman Shawn Neudauer.

Elmer Diaz, 19, is charged with rape, assault with a dangerous weapon, kidnapping and threatening to commit a crime. His brother, Ariel Diaz, 24, was charged with unarmed robbery, assault and battery with a dangerous weapon, indecent assault and battery, kidnapping and witness intimidation.

He was deported to Guatemala in May 2014 after convictions for drunken driving and disorderly conduct, said Neudauer.

Another brother, Adan Diaz, 32, and Marlon Josue Jarquin-Felipe, 27, are both charged with indecent assault and battery and kidnapping. All four suspects are from Guatemala. Jarquin-Felipe was deported back to his homeland in April 2014, according to Neudauer.

Neudauer told the Herald yesterday the agency is “closely monitoring the cases and has placed detainers on all four” illegal immigrants. He added that Ariel Diaz was also arrested this winter on a drunken driving charge. ICE was not notified of that case, he added.

In the Framingham case, the victim’s boyfriend was beaten while his girlfriend was held down on a bed and raped Sunday evening, authorities say.

The still-shaken boyfriend told the Herald yesterday that he and his girlfriend have not yet come to terms with the horrific assault.

“I thought we were going to die. I really did. And I didn’t care if I died as long as I could save her and get her out of there, that’s all I cared about,” said the ?boyfriend, whose name the Herald is withholding.

“I’ve lived (in Framingham) my whole life and I never imagined anything like this could happen just walking down the street,” he said. “The worst part was I felt like I couldn’t do anything.”

According to authorities, he and his girlfriend were out walking and enjoying an unseasonably warm evening when they were approached by a man carrying beer, police said. The man appeared friendly and offered them a drink, then three more men emerged, police said.

One produced a condom and indicated he wanted the man’s girlfriend. One grabbed his girlfriend by the hood of her sweatshirt, dragging her away, while the biggest of the group kept her boyfriend back, police said.

“They brought her into the building on the corner into the apartment,” police said. “They pulled a dresser or table across the door of the room so she could not leave … (They) were trying to climb on her while the others were groping her.”

Her boyfriend managed to force his way into the apartment and was calling 911 when two of the men broke away to handle him, ?police said.

Police said Ariel Diaz head-butted the man several times and then grabbed a large chef’s knife and tried slashing him, but Jarquin-Felipe pushed the knife-wielder back, stopping him from stabbing the man.

Police said that’s when the boyfriend smashed his would-be stabber with a beer bottle. He then advanced on the bed where his girlfriend was pinned and helped her escape.

“After we got out, we got down to the street and she was screaming, ‘Police! Police!’ and I was like, ‘Don’t stop, just keep running,’ ” he said. Police soon arrived and arrested all four suspects, also finding the boyfriend’s missing cellphone and clothing the woman said the alleged attackers wore in the apartment where two of the suspects live.

All four suspects have pleaded not guilty and were held pending dangerousness hearings, according to court filings.