The Ukrainian military is not known to be particularly welcoming to LGBTQ people, but it needed bodies in early 2014 to confront Russian forces that had entered Ukrainian territory on their way to annexing Crimea.

That Ukraine was woefully unprepared for battle was obvious in several ways: outdated equipment; approximately 130,000 poorly trained troops (compared with 845,000 experienced Russian soldiers); an organizational structure widely accused of corruption; and the brutal hazing of new recruits and volunteers.

Many of those military newcomers have been gay and transgender soldiers who ignored prejudice and harassment to defend their country against invasion.

Zhenya smokes during an interview in Kiev, Ukraine on Oct. 29, 2017. Lana Yanoska

Now, with the "invisible war" in its fourth year and having claimed at least 10,000 lives, some members of the country's LGBTQ community hope that the contributions of those gay and transgender soldiers will help alter Ukraine's aversion to sexual and gender minorities, in the military and beyond.

Zhenya, a 32-year-old combat medic and queer woman who joined the Ukrainian military at the beginning of 2016, signed a three-year contract and has already been deployed three times with a fourth stationing on its way. She comes from a military family — her father fought for a year in the current conflict — and her decision to enlist has made him proud. Her sexual orientation, however, which she revealed at 19, caused its own warfare at home, she said.

“I’m not fully open, because I had some problems with my family,” Zhenya, who asked to be identified by a pseudonym to protect her privacy, told NBC News. “My parents had a hard time, because they didn’t really accept it, so we don’t talk about queer stuff at all. And in the army, well, they can guess, but it’s kind of like 'don’t ask, don’t tell.'”

Andriy Chumakov, left, and his long-term boyfriend, Artem Shevchenko look onto Maidan Square, in central Kiev, Ukraine on Aug. 8, 2017. Lana Yanovska

Andriy Chumakov, 34, said heterosexual and gay people were afraid to go into the military at one time because of "the beatings and the exploitation."

“It’s changed now," he said. "People go there voluntarily, because they care about having their country not invaded by another country.”

While Chumakov, who is openly gay, is not technically in the military, he has been collecting and sending supplies to the front line as a volunteer since the conflict began.

Anastasia Polyanskaya, a 41-year-old transgender woman, also felt compelled to serve her country, volunteering for the Ukrainian military in 2015. Her first deployment was at the border with Trans-Dniester (a breakaway region that the United Nations recognizes as a de jure part of Moldova), where it was feared Russian troops could move into Ukraine from the West.

After being injured and spending three months in the hospital, Polyanskaya is now being discharged. She is not entirely disappointed to have her military service come to an end.

“I can’t be the woman that I am there," she said. “It seems like being transgender shouldn’t matter, but it does." She hopes one day this will change.

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

'Social borders were broken'

The Ukrainian military’s poor reputation started to turn with the rise in volunteer battalions, which flooded the front line — and included nontraditional troops, like openly LGBTQ people and women — and fought alongside Ukrainian soldiers against the Russian intervention.

While broader Ukrainian society has its share of overt homophobic threats — like members of the ultranationalist Right Sector group threatening that this year's March for Equality, an LGBTQ event in Kiev, would end in a "bloodbath" — Chumakov said threats like these do not exist in the army.

"Are we not heroes? We have given our time, our strength, our blood and our sweat, and yet we are still being hunted and discriminated against. Have we done enough to be given respect and the right to be who we are?" Zhenya

“The most horrible thing that can happen is a light joke that comes from elderly Soviet people,” he said, recalling experiences of the openly gay soldiers that he knows and his own personal encounter delivering supplies to the front line.

“On the street during the [Euromaidan] Revolution everyone was the same,” he said, referring to the uprisings in February 2014 that led to the ouster of Viktor Yanukovych as president. “Old, young, gay, straight, whatever. All social borders were broken.”

Zhenya, who has spoken to some of her military colleagues about LGBTQ issues, including the March of Equality, agrees.

“When you start talking to military people about LGBTQ stuff, you realize that homophobia is socialized,” she said. “It’s just a habit and a group mentality thing.”

Military culture and social change

Aaron Belkin, director of the Palm Center, a San Francisco-based think tank that researches issues surrounding sexuality and the armed forces, noted that military culture is not necessarily "hostile towards homosexuality" and typically depends on a mix of social and top-down influences.

“Whether a culture is neutral or hostile kind of depends on the command," Belkin explained. "If you have a unit with a tolerant commander, they will enforce tolerance in their unit and that could actually change hearts and minds. By contrast, if you have a homophobic commander, that can have an impact, too.”

The 2011 repeal of the “don’t ask, don’t tell” policy in the U.S., according to Belkin, fell very much in line with growing acceptance and visibility of LGBTQ persons throughout American society paired with evidence that inclusivity in the armed forces would not harm military cohesion and readiness.

“For the most part, inclusivity enhances military readiness,” Belkin said. “It allows people to be who they are while in combat. Plus, you need bodies at war, and you don’t want to fire people — mission critical talent — on the basis of gender or sexuality."

A Ukrainian soldier gets ready to train with Canadian Forces at the International Peacekeeping and Security Centre (IPSC) in Starychi, Ukraine on Oct. 26, 2017. Lana Yanoska

According to a 2016 poll by Kiev International Institute of Sociology, 45 percent of Ukrainians surveyed believe LGBTQ rights should be limited in some way, but as the country has aligned itself closer to Europe, steps to dismantle discriminatory legislation have increased as the conflict continues in the east.

Positioning itself toward Europe has also resulted in the Ukrainian military receiving training and support from other armed forces like Canada — a country with a military ranked sixth in the world for LGBTQ inclusivity by the Hague Center for Strategic Studies in 2014.

Holding a noncombative role, the Canadian armed forces have been assisting the Ukrainian military in developing their own training practices — in marksmanship, combat first aid, logistics and bomb disposal — with the aim of helping them achieve a level of operational effectiveness that meets NATO standards.

Whether two cultures working side-by-side in a strategic military context can improve tolerance to diverse sexual orientations and gender identities remains to be seen. Canada and Ukraine, after all, have two very divergent cultures when it comes to LGBTQ issues — Ukraine was ranked 52nd on the same LGBTQ military inclusivity index that ranked Canada sixth (and the U.S. 40th).

“You could imagine a situation where the training is explicit and trainers talk very candidly about the importance of inclusivity,” Belkin said. “You could also imagine a more symbolic effect due to the simple fact that they’re collaborating in the first place. But these things aren’t mutually exclusive, and you can also imagine a bit of a backlash to openness and a kind of common 'don’t ask, don’t tell' understanding, because the Ukrainians have other things on their plate.”

Could gender equality lead to LGBTQ equality?

A 2016 report commissioned by the Ukrainian Women's Fund, which included interviews with 42 women who had worked on the front line in the current conflict, explored issues surrounding gender equality and women's integration in the military.

“Women told us that the stereotypical attitude toward them changed during service, to one that was more or less equal to their male combatants," Ganna Grytsenko, a sociologist who worked on the study, titled "Invisible Battalion," told NBC News.

Soldiers stand in a final formation at the end of training at the International Peacekeeping and Security Centre (IPSC) in Starychi, Ukraine on Oct. 26, 2017. Lana Yanoska / NBC News

"The topic of gender equality is better, but levels of homophobia are still quite high," Grytsenko added. "Gays and lesbians are fighting and defending their country, too," she said, noting the military and society will have to address this reality.

The participation of women in the conflict has forced Ukraine’s Ministry of Defense to start removing gender bias from its labor policies and open up more positions to female service members, according to Grytsenko and Zhenya.

LGBTQ service members, like Zhenya, hope their military service will have a similar impact. She said that after the conflict is over, she hopes lesbian, gay, bisexual, transgender and queer service members will be recognized for the service they paid to their country.

“I hope they all come to [Kiev] Pride in their uniforms and medals to show that LGBTQ people existed on the front line,” she said. “Are we not heroes? We have given our time, our strength, our blood and our sweat, and yet we are still being hunted and discriminated against. Have we done enough to be given respect and the right to be who we are?”

FOLLOW NBC OUT ON TWITTER, FACEBOOK AND INSTAGRAM