A grandma was mistakenly sent to an all-male jail in Florida because staff mistook her as transgender — and now she’s suing over the nightmarish screw-up, according to a report.

Fior Pichardo de Veloz, 55, who works as a lawyer in the Dominican Republic, flew into Miami for her granddaughter’s birth in November 2013 and was arrested at the airport on old drug charges, according to a lawsuit cited by the Miami Herald.

During the booking, she was escorted to a medical unit for a blood pressure-related checkup, where her file showed she was taking hormone pills, according to the court papers.

A nurse, Fatu Kamara Harris, assumed she was born a man and popping estrogen to grow breasts — but she was actually undergoing hormone replacement therapy to help with symptoms of menopause, the court documents state.

A doctor, Rodriguez-Garcia, then “reclassified” her as male without asking about her gender, examining her body or inquiring about the hormones, according to the report.

When a corrections officer asked the nurse if she had physically examined de Veloz, she brushed her off, firing back, “She’s a man” — and then walked away, the Miami Herald reported.

Despite the fact that de Veloz had no “abnormal” private parts and identified as a woman, she was sent to Metro West Detention Center, where she was traumatized, according to the paper.

“You are a woman. Good luck if you’re alive tomorrow,” a corrections officer told her, according to the suit.

She was then placed in a holding cell with roughly 40 men, some of who leered at her, laughed and yelled out “Mami! Mami!” according to court documents

De Veloz — who spent a total of 10 hours in the men’s jail — was terrified to use the toilet alone, so “she urinated on herself instead,” the lawsuit states.

The screw-up put her in “immediate danger” and subjected her to “cruel and unusual punishment,” she said in the suit, which was tossed at first, then overturned on appeal late last month.

A judge found that the nurse and doctor were “deliberately indifferent” to her well-being and “stubbornly refused” to confirm her gender.

“Every reasonable prison officer and medical personnel would have known that wrongfully misclassifying a biological female as a male inmate and placing that female in the male population of a detention facility was unlawful,” federal appeals court Judge Frank Hull wrote in the unanimous opinion.