BROOKLYN — Samantha Randazzo went into labor during her arraignment on a drug charge in Brooklyn criminal court late Friday night, delivering a baby boy on a courtroom bench. The birth occurred hours after she had been discharged from a hospital.

The New York Police Department said Randazzo was arrested Thursday evening after officers saw two people on a rooftop at a public housing complex in Sheepshead Bay with a controlled substance in plain view. During a search of the rooftop, police found Randazzo in possession of a controlled substance and arrested her. Officers charged her with criminal possession of a controlled substance and criminal trespass.

According to a police statement, at the time of the arrest and at the station house, Randazzo was wearing baggy clothes, did not inform officers she was pregnant, did not indicate any disabilities, and declined medical attention. At around 3:30 a.m. on Friday, she informed officers she was pregnant and experiencing withdrawal from drugs. Police took her to Coney Island Hospital, which later discharged her.

At nine months pregnant, Randazzo's water broke just before midnight and she slouched on the bench where she was seated. Al Baker, a spokesperson for the Office of Court Administration, said her wrists were cuffed behind her back as she waited for her case to be called and that officers removed her restraints once her water broke. A call was made to the FDNY after she gave birth, and she was transported by emergency medical services to Brooklyn Hospital.

Wynton Sharpe, an attorney, described the situation as "joyful and sad." He praised court officers for rushing to assist Randazzo when her water broke and said he expects her charges to be dismissed.

The Legal Aid Society, Brooklyn Defender Services, New York County Defender Services, the Bronx Defenders and the Neighborhood Defender Service of Harlem issued a joint statement criticizing the decisions leading up to Randazzo's labor and calling for an investigation into the incident and a review of protocols governing pregnant people in custody. "What occurred in that courtroom was not simply a failure of protocol or preparedness. It was a profound moral failure and a devastating reflection of the cruelty embedded in our carceral system," the groups said.