(AP Photo/J. Scott Applewhite)

Republican leaders avoided another explosion over gay rights on the House floor Monday when they stripped language from a VA bill that would have rolled back expanded rights for LGBT employees who work for federal contractors.

The broader bill would provide greater access for veterans to private medical care outside the VA system, particularly in rural areas. Long sought by the Department of Veterans affairs, the legislation was set for a vote on the House floor Monday night.

But early Monday, Republican House leaders pulled a provision that had quietly passed the House Veterans’ Affairs Committee, after Democrats and the gay rights groups protested.

[House turns into battleground over LGBT rights]

The little-noticed language would have allowed private doctors and other medical providers to sign contracts with VA even if they offered no protections from discrimination to lesbian, gay, bisexual and transgender employees. The language would have overridden an executive order President Obama signed in 2014 that prohibits federal contractors from discriminating on the basis of sexual orientation or gender identity.

Republicans eventually pulled the entire VA bill from consideration because of objections from veteran groups to a separate provision on cost-of-living- adjustments. But the move to strip the LGBT language was a clear sign that House Republicans find themselves in a politically uncomfortable spot in the bitter national debate over gay and transgender rights.

[Gay groups gird for battle against religious-based legislation they say would deny their rights]

Late last week, lawmakers erupted in chaos on the House floor as they debated a similar measure that started in committee as a religious-based amendment tacked onto the annual defense policy bill. That language also would have stripped away gay and transgender rights in federal contracting, but on the basis of religious objections from the contractors themselves.

Democrats moved to repeal the measure when it reached the House floor, but GOP leaders had trouble finding the votes to block their opponents’ amendment. Republicans eventually were able to whip their members to vote down the Democratic plan, but not before Democrats shouted “shame” at their colleagues and accused them of  promoting bigotry and discrimination over proposals GOP leaders say are intended to protect freedom of religion from government overreach.

The gay and transgender language in the VA bill was supported by the agency, because officials believe that the anti-discrimination language in place now increases red tape for small private medical practices that want to do business with the government, a House aide said.

But what was red tape to the government was a loss of protections to gay rights groups, who rallied on Monday to spread word of the VA measure.

“We made it crystal clear that we viewed this provision as a continuation of the fight from last week,” said David Stacy, director of government affairs for the Human Rights Campaign, the largest LGBT rights group.

“I suspect that the House didn’t have any appetite for that.”

A Republican House aide who was not authorized to speak publicly about the LGBT provision said Veterans Committee Chairman Jeff Miller (R-Fla.) authorized the provision to be pulled “to ensure maximum support” for the bill.

VA officials said they were looking into Monday’s events.