The House rejected an attempt Thursday to prevent the Pentagon from paying for gender transition treatment.

A total of 24 Republicans joined Democrats in defeating GOP Rep. Vicky Hartzler’s amendment by 209-214, which recently passed through the Rules Committee.

Those Republicans include Reps. Justin Amash, Mike Coffman, Barbara Comstock, Darrell Issa and Frank LoBiondo, among others.

The amendment would have prohibited the Pentagon from paying for gender transition treatments like hormone therapy.

Pro-LGBT military organizations applauded the vote and called the amendment a “horrifying, vicious attack on service members.”

“Congresswoman Hartzler’s attempt to strip healthcare from service members and their families in a time of war was unpatriotic, unconstitutional, and just plain vile, we are pleased to see that the House of Representatives voted down this amendment,” said OutServe-SLDN Executive Director Matt Thorn. “It would have been harmful to trans servicemembers, spouses, and families with trans children; it would have undermined our mission readiness by degrading our capabilities as a fighting force. OutServe-SLDN will continue to support and defend our trans brothers and sisters in any and all legal and advocacy matters.”

Former Secretary of Defense Ash Carter officially repealed the ban on transgenders serving openly in the military in June 2016.

Pelosi blasted Republicans for the amendment earlier Thursday, saying that trying to strike down gender transition treatment is a threat to national security.

“Republicans should be ashamed: instead of protecting the men and women who risk their lives to defend our freedoms, they are fighting to rip away the health care of thousands of brave service members,” Pelosi said in a statement. “This cowardly Republican amendment targeting transgender men and women in uniform effectively bans these patriotic Americans from serving their country.”

Follow Jonah Bennett on Twitter

Send tips to jonah@dailycallernewsfoundation.org.

Content created by The Daily Caller News Foundation is available without charge to any eligible news publisher that can provide a large audience. For licensing opportunities of our original content, please contact licensing@dailycallernewsfoundation.org.