WASHINGTON -- Republicans quietly voted Thursday to gut President Barack Obama's executive order barring workplace discrimination against lesbian, gay, bisexual and transgender employees of federal contractors.

The House Armed Services Committee voted 33 to 29 to tuck language into the 2017 defense authorization bill -- must-pass legislation -- that blocks the president's 2014 executive action that makes it illegal to fire or harass employees of government contractors based on their sexual orientation or gender identity. Instead, the amendment applies a broad exemption that would allow contractors to openly discriminate against LGBT people based on the contractors' religious beliefs.

More than 2,000 federal contracts are awarded every year to religious organizations. In all, the executive order affects 24,000 companies employing roughly 28 million workers, or about one-fifth of the nation's workforce.

Every Democrat on the committee and two Republicans -- Reps. Frank LoBiondo (N.J.) and Joe Heck (Nev.) -- opposed the measure by Rep. Steve Russell (R-Okla.).

All the other Republicans voted for it, except for one who didn't vote at all (we can't tell who that one was yet): Reps. Mac Thornberry (Texas), Walter Jones (N.C.), Vicki Hartzler (Mo.), Randy Forbes (Va.), Jeff Miller (Fla.), Austin Scott (Ga.), Joe Wilson (S.C.), Mo Brooks (Ala.), Richard Nugent (Fla.), Rob Bishop (Utah), Paul Cook (Calif.), Michael Turner (Ohio), Jim Bridenstine (Okla.), John Kline (Minn.), Brad Wenstrup (Ohio), Mike Rogers (Ala.), Jackie Walorski (Ind.), Trent Franks (Ariz.), Bradley Byrne (Ala.), Bill Shuster (Pa.), Sam Graves (Mo.), Mike Conaway (Texas), Ryan Zinke (Mont.), Doug Lamborn (Colo.), Elise Stefanik (N.Y.), Robert Wittman (Va.), Martha McSally (Ariz.), Duncan Hunter (Calif.), Stephen Knight (Calif.), John Fleming (La.), Thomas MacArthur (N.J.), Mike Coffman (Colo.) and Chris Gibson (N.Y.).

Russell argued that his amendment responds to the fact that Obama's executive order has "caused some confusion … regarding religious contractors within the scope of their protections under law." He said it also violates the First Amendment because it "unduly burdens the practice of religion."

But Rep. Adam Smith (D-Wash.), the ranking Democrat on the committee, said that's not what it does at all.

"The way this amendment is written, it doesn't matter if you're a religious organization," he said. "Basically, you can be a private contractor, and this basically gives you the right to discriminate if you just decide that you don't want to do business with gay people."

ASSOCIATED PRESS If you're a government contractor and you don't really like gay people, this defense bill amendment is for you, says Rep. Adam Smith (D-Wash.).

The committee adopted the amendment in the midst of a marathon hearing that started Wednesday morning and went into the wee hours of Thursday. With so many amendments flying around, it was easy to miss that this even happened.

House Minority Leader Nancy Pelosi (Calif.) called it "really very sad" later Thursday. Minority Whip Steny Hoyer (Md.) said lawmakers who voted to reverse the president's executive action "voted to perpetuate discrimination."

The White House also isn't happy. "We strongly oppose attempts to roll back non-discrimination protections for LGBT workers," White House spokesman Jeff Tiller said Friday. "The President's Executive Order with respect to federal contractors reflects his commitment to advancing equality in employment for the LGBT community, as well as his commitment to expanding opportunity for American workers and strengthening American business."

The full defense bill cleared the committee 60 to 2. It now heads to the House floor, where Democrats could try to strip out the anti-LGBT language out but probably wouldn't succeed. What's more likely is that Democrats in the Senate may try to take out the provision in their version of the bill. Democrats could also try to strip out the language in a conference committee, where the House and Senate go to hash out differences in their bills.

Russell's amendment comes at a time when more than 100 anti-LGBT bills are making their way through state legislatures -- including a ridiculous wave of anti-transgender "bathroom bills." It's all part of an ugly backlash to last year's Supreme Court ruling for marriage equality.