The U.S. House on Thursday rejected an amendment that sought to prohibit the Department of Defense from providing transition-related health care to transgender troops.

According to the Washington Blade, Republican Rep. Vicky Hartzler's amendment was narrowly defeated with a 214-209 vote.

The amendment, which would cut off funds for treatments such as hormone therapy and gender reassignment but not access to mental health treatment for transgender troops, was part of the $697 billion defense authorization bill for 2018.

All 190 Democrats were joined by 24 Republicans in voting against the amendment.

Hartzler, a vocal opponent of LGBT rights, suggested that the amendment was a necessary cost-cutting measure.

“We must confront these challenges by ensuring our defense dollars maximize the military's readiness and lethality,” Hartzler said, referring to threats posed by North Korea, ISIS and Russia. “That is why I'm offering an amendment to advance these goals by prohibiting taxpayer dollars from funding gender reassignment surgeries and related hormone therapy treatments for members of the military and their dependents.”

The Pentagon last year lifted its ban on open transgender military service and was scheduled to begin allowing transgender people to enlist on July 1. Defense Secretary James Mattis delayed the plan by six months.

The Human Rights Campaign (HRC), the nation's largest LGBT rights advocate, applauded Thursday's vote.

“Today’s strong, bipartisan vote sent a resounding message of support for our military families and transgender service members,” HRC President Chad Griffin said. “This dangerous amendment would have put at risk the health and wellbeing of military families, and threatened military readiness and national security. We applaud those members from both parties who stood up for the thousands of transgender service members proudly serving their country.”