As a South Florida family walked into a courhouse expecting to see their daughter appear for a hearing, they recieved a phone call from an inmate informing them that the inmate had died in custody, family attorney Sabino Jauregui told NBC 6.

The family says they were told their daughter was screaming for help inside the jail when she had a medical emergency but no one came to her aid.

And the attorney for Nairobis Alvarez Cruz, said he wasn't notified of her death until the hearing had started.

The corrections department issued a statement about the woman's death, saying there was a "medical emergency."

"The Miami-Dade Corrections and Rehabilitation Department (MDCR) would like to extend our condolences to the Cruz Family," the statement read. "MDCR Corrections Officers responded appropriately and timely to a medical emergency to include emergency room transportation. Due to an on-going Miami-Dade Police Department investigation, no further comment can be made at this time."

Cruz was arrested for robbery with a weapon last month.

Jauregui said he saw her last weekend to prepare for Thursday's arraignment and he told us her family had spoken to her since that, but it was on the courthouse steps about 9:30 a.m., just before they went inside, when they got a call from an inmate at the Pre-trial detention Center about what allegedly happened to Cruz overnight.

"Its alleged she was screaming for help for hours... that she was ignored. Until she finally passed away," Jauregui said.

The medical examiner's office indicates Cruz died at 12:19 a.m. Jauregui had no idea Cruz was dead and the state attorney had no idea either until they were inside the courtroom about to begin, and Judge Stacy Glick told them about Cruz, her family downstairs in shock.

"They are hysterical. They are crying. They are in very bad emotional state," Jauregui said. "They can't believe that their daughter is gone that she is passed away... vibrant full of life... 20 something."

One source told NBC 6 Cruz was being held on a floor for women with mental health issues and until two months ago corrections officers were inside the open bay cell with the women, but that was changed and the officers are now outside the unit.

"Corrections holds a duty to everyone in the jail to not be negligent to take care of them to make sure their medical needs are met," Jauregui said.

Corrections told us it has a full investigation underway so it can't say anything about what happened.

When it comes to how this family discovered their loved one was deceased, their lawyer certainly indicated the family first and all of the parties should have been given notice about this woman's death and not be surprised here at the courthouse.