House Republican leaders on Tuesday night quashed a bipartisan attempt to eliminate religious liberty language from a defense policy bill that could compromise LGBT employment rights in federal contracting.

With the defeat of a measure by Pennsylvania Republican Charlie Dent, the religious liberty language now heads to the floor as part of the defense policy bill, which the House could vote on as soon as Wednesday.

Lawmakers supporting Dent’s amendment got into a heated exchange with Rules Committee members as they tried to push the Republican majority to strip the LGBT language from the defense bill.

“If this is included in this bill we will be sending a message that the House has used a very important national security measure to make a statement about the equality of a group of Americans, and it’s just inappropriate,” said Rep. Sean Maloney (D-N.Y.), an openly gay member of Congress.

Maloney challenged the committee over why he should have to choose between voting against LGBT employment protections or opposing the war effort to counter the Islamic State.

“At a minimum, we should be allowed to discuss it and vote on it on the House floor,” Maloney said.

The original language — introduced by Oklahoma Republican Steve Russell — was added to the defense bill in committee and would make religious groups and organizations that contract with the federal government exempt from certain parts of federal civil rights law and the Americans with Disabilities Act.

Russell and his supporters argued that the move was necessary to clarify “ambiguous language” to ensure that the rights of the approximately 2,000 religious organizations that receive federal contracts annually are protected.

But opponents argued the change would effectively trample on President Obama’s 2014 executive order preventing federal contractors from discriminating on the basis of sexual orientation or gender identity. The Human Rights Campaign said it was the first measure to roll back lesbian, gay, bisexual and transgender protections that has passed a committee since the Supreme Court struck down laws prohibiting same-sex marriage.

“We can’t let ourselves fall into the misconception that religious freedom and nondiscrimination are mutually exclusive. We can do both,” Dent argued to the House Rules committee Tuesday.

The religious liberty measure comes to the House floor as a debate rages across the country on transgender rights, most prominently in North Carolina, where a bill has been enacted to restrict where transgender people can use bathrooms and locker rooms. The state is now suing the government and the government is suing North Carolina.

The White House cited concerns about discrimination on the basis of sexual orientation as one of the many objections behind a veto threat issued Monday night against the defense policy bill.

Dent and others maintained that Russell’s measure, which applies to all federal contractors, was “overly broad.”

Rep. Richard Hanna (R-N.Y.) told the Rules Committee on Tuesday that while he had “no fundamental argument with the intent” of Russell’s measure, the practical effect “goes way beyond that” and “could be exploited as a license to discriminate against LGBT Americans by almost any federal contractor.”

Dent said in an interview that he would prefer to deal with religious freedom issues in concert with “an affirmative statement on non-discrimination,” such as passing the Employment Non-Discrimination Act, or ENDA, legislation that would prohibit employment discrimination on the basis of sexual orientation and gender nationwide.

ENDA has failed to pass several Congresses over stiff Republican opposition. And GOP members pointed to the lack of such a law on the books as a reason to block Dent’s group from pushing back against the religious-based measure.

“If there is discrimination, this is the exact same thing that’s allowed in the private sector. All this does is equalize what these corporations have in the private sector,” argued Rep. Bradley Byrne (R-Ala.), a Rules committee member. “I’m trying to figure out what’s wrong with that —  how is that depriving somebody of a right?”