LIMA, Peru — “Blood was squirting out of my chest,” says Brithany Cervantes as she recalls being stabbed multiple times with a broken bottle for no other reason, she says, than being a transgender woman.

“All that saved me was putting my hand over my heart. I could have died,” adds Cervantes, as she shows the jagged scars above her left breast and on the back of her left hand.

Yet the most chilling detail regarding the frenzied nighttime attack in downtown Lima last October has little to do with her unknown assailant. Rather, it concerns the municipal security agent who watched the entire episode from the other side of the street without lifting a finger.

These agents, known as “serenos,” are a routine sight in Peru, where endemic police corruption and ineptitude has led most municipalities to establish their own force of security guards to plug the public safety gap.

After the attacker had fled, Cervantes, 23, close to passing out from loss of blood, approached the agent for help. Without a word, she says, he started his motorbike and rode off, abandoning her to her fate.

The incident highlights a growing paradox in Latin America, a region which has some of the highest levels of acceptance of LGBT rights in the world but also some of the highest rates of homophobic and transphobic violence.

According to the 2018 Best Countries rankings, which surveyed 21,000 people around the globe, 82 percent of people in the Americas, including Latin America, believe LGBT individuals should have the same rights as non-LGBT folks. That compares to 73 percent in Europe, 74 percent in Asia and just 63 percent in the Middle East and Africa. In Brazil, Argentina and Mexico, the figures were respectively 87 percent, 85 percent and 83 percent.

Yet the violence persists. A 2015 study by the Inter-American Commission on Human Rights reported nearly 600 homicides of gay men, lesbians or transgender people, motivated by their sexual identity, between January 2013 and March 2014 throughout Latin America. Many experts believe that toll may be a serious underestimate given that most Latin American jurisdictions have no requirement for local authorities to register a murder as being the result of anti-LGBT hate.

Yet the U.S. News survey also reflects a complex changing reality in the region for gay rights. Countries with same sex marriage now include Argentina, Brazil, Uruguay and Colombia, while it is also permitted in several Mexican states and Mexico City.

Various Latin American countries allow same sex couples to adopt. Bolivia allows transgender individuals to change the gender on official documents, and more than a dozen nations have outlawed workplace discrimination based on gender or sexual identity.

Latin America has also been central to the global campaign for equal rights. That includes pushing through United Nations resolutions, including one watershed 2011 U.N. Human Rights Council resolution, long promoted by Brazil in particular, urging an end to discrimination on grounds of sexuality. Last year, Montevideo hosted thelaunch of the Human Rights Coalition, bringing together dozens of national governments keen to work towards promoting LGBT rights and protections.

Graeme Reid, director of the LGBT program at Human Rights Watch, says the advances made by Latin America come from a cocktail of factors including the community’s own campaigning and, perhaps surprisingly, the influence of the church in the predominantly Catholic region, and in particular, the pope.

Argentine-born Pope Francis is the first ever pontiff from the region and is revered from Tierra del Fuego to Tijuana. He has struck a less moralistic tone on a range of social issues including his groundbreaking 2013 comment: “If a person is gay and seeks God and has good will, who am I to judge?”

Reid says: “As archbishop of Buenos Aires, Francis opposed same sex marriage – but that is almost part of his job description – but proved pragmatic on other issues, including civil partnerships. It is unquestionable he has had an ameliorating or softening influence on the Catholic church and has effectively given permission to be more sympathetic.”

Nevertheless, homophobia and transphobia remain entrenched in much of the region. Even in Brazil, famed for its gender-bending sex workers known as “travestis,” grotesque violence, including murder, against the LGBT community remains common, particularly in remote rural areas.

No LGBT group is more vulnerable to violence than transgender women. Many of them become sex workers, like Cervantes, working the streets late at night in high risk neighborhoods for the simple reason that social prejudices mean it is often impossible for them to find other ways to make a living.

Even in her earliest memories of growing up in the Andean city of Cusco, the former capital of the Inca Empire that is now a tourist magnet, Cervantes knew she was different from other boys or, in her own words, “delicate.”

Her mother, a cosmetics saleswoman, was sympathetic, but baffled by her child’s identity. Her disciplinarian father, however, was unforgiving.

“My mother loves me unconditionally. But she thought I was sick. She thought I could be cured. But my father never understood,” says Cervantes. “I thought I was gay. People had some idea of that, but they had never heard of trans.”

Cervantes eventually ran away from home when she was 17, a move that allowed her to begin discovering her real identity. Finally, with the help of a psychologist, she started to fully feel at home in her own skin and actually develop a positive sense of her trans identity, allowing her to launch her transition from male to female.

That process has been helped by Feminas, a nongovernmental organization in Lima that supports some 500 transgender women, providing guidance and medical and psychological care, including an endocrinologist who oversees their hormone treatment.

However, it is now entrenched prejudice in some quarters that continues to negatively shape the lives of Cervantes and other transgender women across Latin America.

Working the streets, she faces nightly violence, pimps extorting her for using “their” sidewalk, and hostility and even beatings from law enforcement officials.

“For now it is my work,” says Cervantes. “But it is important to get out of that environment, to see the possibilities, that not everything is discrimination and violence. I would like to study and also to help other trans women. They need all the support they can get.”