The House voted Thursday to reject controversial amendments to the annual defense authorization bill, including a proposal to bar transgender service members from receiving general reassignment therapy.

That amendment, from Rep. Vicky Hartzler (R-Mo.), would end the Pentagon’s policy, in place since October, of providing gender-reassignment surgeries and other therapies for active-duty transgender service members if a doctor deems the treatment medically necessary. It was defeated 214-209, with 24 Republicans joining all 190 Democrats who voted.

Another hot-button amendment, offered by Reps. Scott Perry (R-Pa.) and Ken Buck (R-Colo.), would have deleted a section from the bill ordering a Defense Department study to assess “vulnerabilities to military installations and combatant commander requirements resulting from climate change over the next 20 years.” That measure went down 234-185.

Both were among 210 amendments to the National Defense Authorization Act sent to the floor by the House Rules Committee. The defense bill, which authorizes up to $696 billion in 2018 military spending, is expected to come to a final vote Friday.

The Hartzler amendment, in particular, raised the hackles of congressional Democrats and LGBT activists who say that it would deny medically justified health care to thousands of service members.

Stephen Peters, a spokesman for the Human Rights Campaign, called the amendment “unconscionable” and an “attack on active duty troops and their families.”

“It puts their health at risk and undermines military readiness by stripping away the ability of medical professionals to ensure their patients have the care they need and deserve,” Peters said in a statement. “It is imperative that the House of Representatives reject this harmful amendment.”

As the defense bill was being drafted last month, during debate by the House Armed Services Committee, Hartzler proposed reversing the military’s transgender service policy entirely, but she later withdrew the amendment to give the Pentagon time to address the issue without congressional intervention. But at the time, she said that she reserved the right to submit a floor amendment dealing with the transgender policy.

On the House floor Thursday, Hartzler argued that funding gender reassignment therapy diverts federal funds from other national defense priorities and could hurt military readiness.

“We must have soldiers who can deploy if called upon,” she said. “Military members undergoing transition surgery are nondeployable for up to 267 days. Similarly, regular hormone treatments renders individuals nondeployable into the future. It makes no sense to create soldiers who are unable to fight and win our nation’s wars and unfair to nontransitioning individuals who must leave their families and deploy in their place.”

Rep. Duncan D. Hunter (R-Calif.) laid out a blunter argument for the amendment: “You’re joining the U.S. military. Choose what gender you are before you join. … We’re not stopping transgender people from joining. We’re saying taxpayers in this country right now are not going to foot the bill for it.”

Democrats, including House Minority Leader Nancy Pelosi (D-Calif.), lined up to lambaste the amendment on the floor.

“No one in the Pentagon has called for this,” said Rep. Sean Patrick Maloney (D-N.Y.). “In fact, we know right now Secretary of Defense [James] Mattis is running a review of this issue. He does not need to be micromanaged by members of this body to advance their own agendas.”

Most of the amendments offered to the defense bill deal with small-bore issues related to military policy, often tailored to a individual members’ congressional districts. But a few, like the transgender and climate-change amendments, were more closely watched. The Perry-Buck amendment to strip the climate-change report comes after now-Defense Secretary Jim Mattis called climate change a potential national security threat during his January confirmation hearing.

“This is to focus on those resources that pose an immediate and direct threat to our national security,” Perry said. “Litanies, literally litanies of other federal agencies deal with environmental issues including climate change.”

But members of both parties — including Rep. Elise Stefanik (R-N.Y.), chairman of the Armed Services subcommittee on Emerging Threats and Capabilities — rose to oppose the amendment.

Another closely watched amendment, offered by Rep. Tom McClintock (R-Calif.), would have paved the way for a new round of military base closures by eliminating language now in the defense bill prohibiting the base closure and realignment, or BRAC, process for 2018. The last BRAC process was completed in 2005. McClintock’s amendment was defeated 248-175.

Democrats on Thursday questioned why House Republicans would not allow even more of the 440 filed amendments.

“The Republican majority decided it’s okay to debate a bigoted amendment that prohibits medical treatment for transgender service members in transition, but they will not let the House debate an amendment that just a calls for a study — a study — on blood donations from gay men,” Rep. Jim McGovern (D-Mass.) said on the House floor Thursday. In protest, McGovern moved to adjourn the House, prompting members to trudge to the floor for an unexpected vote.

Pelosi railed against the Hartzler amendment at a news conference Thursday, calling it “mean-spirited and discriminatory” and saying it would reverse a bipartisan effort to allow non-straight service members to serve openly.

At his own news conference Thursday, House Speaker Paul D. Ryan (R-Wis.) gave a lukewarm assessment of the Hartzler amendment, stopping short of a clear endorsement.

“I think it’s important that we work closely with the DOD on this,” he said, referring to a pending Pentagon review of the military’s transgender policy. “We’ll see what happens with the Hartzler amendment.”