Ribeiro Semedo said at one point on her third day at Burlington, she began to feel severely ill. She laid on the floor, unable to get up and deeply concerned about her baby‘s health.

She said as the pain spread across her belly, she struggled to get the guards’ attention. “I started banging on the door. I was like, ‘I need help.’”

At the hospital, agents were stationed outside her room for days, she said. On Tuesday, ICE released her on her own recognizance, her attorney, Carl Hurvich said, after he filed a habeas petition in federal court challenging her detention.

Tricia McLaughlin, the Department of Homeland Security assistant secretary, said in a statement to the Globe on Monday that it was “standard procedure” to have officers with detainees when they are taken to the hospital for medical care.

McLaughlin said holding pregnant women in detention is “exceedingly rare.”

ICE released Djeniffer Benvinda Ribeiro Semedo on Tuesday after her lawyer, Carl Hurvich, filed a habeas petition in federal court. Samedo, who is in her second trimester of pregnancy, remains hospitalized after becoming ill while in ICE detention in Burlington.Provided by Carl Hurvich

“They receive regular prenatal visits, mental health services, nutritional support, and accommodations aligned with community standards of care,” McLaughlin said.

This includes intake screenings within 12 hours of arriving at a detention facility, full health assessments within 14 days, and 24-hour emergency care, she said.

“This is the best healthcare many of these individuals have received in their entire lives,” said McLaughlin.

ICE arrested Ribeiro Semedo at Brockton District Court last week after she appeared in court for an outstanding default warrant in a pending case from 2024, which stemmed from a prior domestic dispute with a former partner, according to court documents.

Ribeiro Semedo came to the United States legally from Cape Verde about nine years ago, and stayed in the US on a conditional green card through her mother, according to her and her attorney. Ribeiro Semedo held that conditional lawful permanent status until her mother’s status was eventually terminated at an unknown time. Ribeiro Semedo was entitled to a review of her status by an immigration judge, Hurvich said.

He noted that ICE’s own policy from 2021 says the agency should not “detain, arrest, or take into custody for an administrative violation of the immigration laws individuals known to be pregnant, postpartum, or nursing,” unless under exceptional circumstances.

“There are pregnant women around the country who are being shackled,” Hurvich told the Globe. “This is definitely something that we would not have seen before the current leadership in ICE in this administration.”

Ribeiro Semedo’s former partner alleged she struck him with broken glass, and began to push and scratch him, his brother, and his mother, who were all present, according to a police report of the incident. Ribeiro Semedo told police her former partner and his family members dragged her out of the house.

After police arrived, they arrested Ribeiro Semedo on a number of charges, including domestic violence assault and battery. She was also charged with assault and battery with a dangerous weapon, court records show.

The former partner appeared unharmed, and the brother had a minor scratch, according to the police report.

McLaughlin, from DHS, criticized “sanctuary politicians” for releasing Ribeiro Semedo, given her criminal charges for domestic battery.

Ribeiro Semedo, who said she did not know about the warrant until last week when state police asked for her identification during a traffic stop, denies the allegations.

After the hearing, Ribeiro Semedo said a court officer brought her downstairs.

“I have bad news for you, ICE is here for you,” she recalls a court officer telling her. There, ICE officers handcuffed her hands and feet, and led her to a van and took her to Burlington.

Hurvich, her attorney, said the arrest was an example of ICE assuming that “anyone who just had a criminal charge must be a danger” — without giving people a chance to clear their names of any charges.

“There were assault charges, but especially for certain communities that are very heavily policed, those often can be exaggerated, they can be untrue,” Hurvich said. “That’s why we have a court system.”

Dr. Blair Johnson Wylie, chief of obstetrics and gynecology at Beth Israel Deaconess Medical Center, said in a court declaration that Ribeiro Semedo was admitted on Feb. 13 to the medical center with “nausea, vomiting, abdominal pain, and decreased fetal movement.”

The symptoms, Ribeiro Semedo told medical personnel, had persisted for about three days, and seemed to be exacerbated by the detention conditions. Before her arrest, Ribeiro Semedo told hospital staff, she “had a normal pregnancy and received routine prenatal care,” according to the declaration in court.

“The patient reports feeling stressed, isolated from family, uncertain and depressed,” Dr. Wylie wrote.

Ribeiro Semedo is anemic, still has abdominal pain and nausea, and may have to undergo surgery for gallstones. Medical staff had concerns about this triggering preterm labor, according to the interview and court documents.

“According to the Patient’s report, she did not receive appropriate food during her detention at ICE, and that likely worsened her condition,” Dr. Wylie said in the declaration. “The Patient’s detention in an ICE facility . . . places her at higher risk of preterm labor and other pregnancy complications.”

From her hospital bed, Ribeiro Semedo said she was worried about her baby. Her plan was to go to her mother’s home when she was discharged, and recover from there.

But after her detainment, she’s fearful of leaving the hospital, concerned that ICE will decide to arrest her again — and she is afraid ICE will go after members of her family.

“I’m scared to go to my mom’s house because they’re going to be watching her, too,” Ribeiro Semedo said.

Laura Crimaldi of the Globe staff contributed reporting.

Giulia McDonnell Nieto del Rio can be reached at giulia.mcdnr@globe.com. Follow her @giuliamcdnr.