RIO DE JANEIRO — Barbara Aires, who was assigned male at birth, says she spent much of her childhood on the streets, because her father — a military man from the conservative state of Minas Gerais — refused to accept her gender identity.

By her late teenage years, Aires was taking hormones to transition to a woman and, because she couldn't find other employment, working as a prostitute — the fate of many transgender people who are shunned by much of Brazilian society.

Today, Aires is running to be a state representative in Rio de Janeiro, aiming to help other trans people avoid the same fate she suffered and be a voice for other marginalized people.

"When all you have are rich, white men discussing policies, things will never improve for the majority of people," said Aires, 35, a freelance television producer who is part of the left-leaning Socialism and Liberty Party.

Aires is one of 53 transgender candidates running for state and federal offices in Brazil, a deeply conservative and religious country that is also one of the most dangerous in the world for the transgender community. Last year, 179 trans people were killed in Brazil, up from 144 in 2016, according to Brazil's National Association of Transvestites and Transsexuals. So far this year, 122 have been killed.

The boom in transgender candidacies — there were only five trans candidates during the last general election in 2014, and none were successful — comes as Latin America's largest nation struggles to emerge from its worst recession in decades, and the political class has largely been discredited amid a massive corruption scandal involving billions of dollars in kickbacks to politicians.

The presidential poll leader, far-right congressman Jair Bolsonaro, has a long history of offensive comments about gays, trans people, women and minorities.

For transgender candidates, Bolsonaro's candidacy — the candidate has said it would be better to have a dead son than a gay son — both invokes fear and stands as potential galvanizer to get people out to the polls.

Bolsonaro "represents a step backward and we are very worried," said Bruna Benevides, from the National Association of Transvestites and Transsexuals. "But being transgender has never been easy. We have always been fighting (for acceptance) and will just continue to fight."

Benevides' life encapsulates the struggles that many transgender people face, though she considers herself luckier than most. Assigned male at birth and born into an evangelical family, at 17 Benevides joined the Navy and officially is still part of the institution as a sergeant. However, inside, Benevides said she always felt like a woman, and four years ago, she said she decided to stop dressing as a man for work.

She says the Navy then prohibited her from working and put her on leave. She has since sued and her case is pending.

Despite widespread discrimination and grim statistics — LGBTQ groups estimate that 35 is the life expectancy of transgender Brazilians — there are signs of change.

Earlier this year, Brazil's highest court ruled that people could change their name and gender on their identity cards by simply asking to do so. Previously, any legal change required sex reassignment surgery and court filings.

Also this year, drag queen and singer Pabllo Vittar headlined the parade of one of Rio de Janeiro's most storied samba schools during Carnival. Last year, Tiffany Abreu, a transgender athlete, began playing with a team in the top women's volleyball league.

While transgender candidates address issues in the LGBTQ communities, many are also running on broader platforms aimed at appealing to voters of all stripes — necessary to have a realistic shot at getting elected.

For example, Aires wants to improve transportation in many areas of Rio, increase the number of commuter boats that service nearby islands and reform a prison system that she says only ends up producing more criminals.

Many are also running on the tickets of mainstream parties, which have considerable pull with voters making choices along party lines.

Cristian Lins stands outside City Hall at the end of an interview in Rio de Janeiro, Brazil, on Sept. 14, 2018. In contrast to many transgender people, Lins said he always had the support of his parents. Silvia Izquierdo / AP

One such candidate is Cristian Lins, a 44-year-old freelance photographer running for state representative in Rio de Janeiro on the Workers' Party ticket.

In contrast to many transgender people, Lins, assigned female at birth, said he always had the support of his parents. Over the years, however, trying to act like a woman became harder and harder, he said.

"I always wore shorts and sandals and had short hair," said Lins, the only male transgender candidate running. "The transformation was a natural process."

Lins characterized as a "cry for help" the fact that so many transgender candidates were running, and he was particularly interested in improving how the public health system treats trans people.

Still, as a representative he would not be focused on just their needs: He also wants to raise the salaries of teachers and police and help improve public security; Rio has struggled in recent years to confront waves of violence and crime.

"Politicians are only interested in the LGBT community when it comes time to get votes," said Lins, who on a recent day campaigned at a rally that featured the Workers' Party's presidential candidate, Fernando Haddad. "Since nobody thinks about us, I decided to do what I could so that we have a representative."

FOLLOW NBC OUT ON TWITTER, FACEBOOK AND INSTAGRAM