Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A woman booked into a men's jail in Miami after she was wrongly deemed transgender had her lawsuit over the incident upheld.

Fiordaliza Pichardo was booked as a male at the Turner Guilford Knight Correctional Center after a staff doctor and nurse wrongfully classified her as a male following her arrest for an outstanding warrant stemming from an earlier drug charge, according to her lawsuit filed in federal court.

She spent about 10 hours in a holding cell with about 40 men before she was released on bail, her lawsuit claims.

Pichardo was jailed in December 2013 and initially sued in September 2016, but the claim was thrown out by a federal judge who said the jail employees were protected against claims of neglect.

The U.S. Court of Appeals for the 11th Circuit on Nov. 21 reinstated her lawsuit against Miami-Dade County, the county's corrections department and the nurse and doctor at the jail where she was booked.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The ruling found that the nurse and doctor “knew that sending a woman to an all-male prison would pose a risk of serious harm to her safety," but that the pair "took no steps at all to verify Mrs. Pichardo’s sex before reclassifying her as male."

Pichardo, 55, is an attorney and elected official in her native Dominican Republic. She was in Miami in 2013 for the birth of her grandson when she was arrested at Miami International Airport and taken into custody for a previous failure to appear in court, her attorney told NBC News Tuesday.

Lawyer David Kubiliun said his client did not know there was a warrant out for her arrest.

Upon her arrest, a female officer who conducted a strip search of Pichardo to check for contraband said she “did not notice anything abnormal,” according to the lawsuit.

Pichardo was then processed as a woman at the correctional center.

During a routine medical check, however, the nurse at the center learned Pichardo was taking hormone pills, which the nurse allegedly assumed was to grow breasts, according to the lawsuit. Pichardo contends she was undergoing hormone replacement therapy for menopause-related symptoms, which she said was indicated in her pre-screening assessment form.

A jail doctor then questioned her about her “sex parts,” but did not physically examine her or ask why she was on hormone pills, the lawsuit claims.

Pichardo's attorney said he was "elated" by the appeals court's decision against what he described as "a civil rights violation."

Miami-Dade County did not return a request for comment. The doctor is represented by Miami-Dade's attorneys. An attorney named in the lawsuit as representing the nurse could also not be reached for comment.

Pichardo's attorney said his client suffers from severe post-traumatic stress disorder from the incident for which she is taking medication. She is seeking damages in excess of 5 million dollars.