The fate of the annual defense bill was in doubt on Friday, after Republicans loaded the legislation with a raft of conservative social policy restrictions limiting access to abortions, gender transition procedures and diversity training for military personnel, alienating Democrats whose votes G.O.P. leaders had seen as crucial to passing the legislation.
Democrats pledged to oppose the bill in a vote expected on Friday morning, accusing G.O.P. leaders of having turned what began as a bipartisan bill into a hyper-politicized salvo in a wider culture war to please a small, right-wing faction of their party.
“Extreme MAGA Republicans have chosen to hijack the historically bipartisan National Defense Authorization Act to continue attacking reproductive freedom and jamming their right-wing ideology down the throats of the American people,” Representatives Hakeem Jeffries of New York, Katherine M. Clark of Massachusetts and Pete Aguilar of California, the top three Democratic leaders, said in a statement late Thursday in which they promised to vote against the bill.
Republican leaders expressed cautious optimism that they could unite their party behind the bill and pass it anyway, having added enough of the hard-line changes demanded by the far right to appease the holdouts in their ranks and compensate for Democrats’ near-universal opposition.
“I think we have enough votes to be the majority,” said Representative Tom Cole, Republican of Oklahoma, who earlier this week had been predicting the potential demise of the bill if the G.O.P. lost Democratic votes. “It’ll be close, but I think we’ll win.”
At stake is an $886 billion bill that would grant a 5.2 percent raise to military personnel, include programs to counter aggressive moves by China and Russia, and establish a special inspector general to oversee U.S. aid to Ukraine.
The Republican-led House, prodded by right-wing lawmakers, attached a provision to undo a Pentagon policy adopted after the Supreme Court struck down abortion rights to provide time off and travel reimbursement to service members who must travel out of state to obtain an abortion.
Republicans also added measures prohibiting the military from offering health coverage for gender transition surgeries — which currently require a waiver — and related hormone therapies. They included language that would eliminate all diversity, equity and inclusion offices at the Pentagon, as well as the positions attached to them.
They adopted a measure barring the Pentagon’s educational arm from buying any book that contains pornographic material or “espouses radical gender ideology.” And with the help of nine Democrats, they approved an amendment that would prohibit Defense Department schools from teaching that the United States or its founding documents are racist.
The measures stand no chance of passing in the Democratic-led Senate, which is planning to begin considering its own version of the bill next week. Even if Republicans can muscle their bill through the House, the deep chasm between the chambers is expected to set off a protracted fight that could threaten Congress’s ability to maintain its six-decade track record of passing defense policy bills each year.
Representative Adam Smith of Washington, the top Democrat on the Armed Services Committee, lamented the Republican approach to the legislation, saying it had ruined a bill that had emerged from the panel on a near-unanimous vote. In a statement Thursday night co-signed by all of the top Democrats on the panel’s subcommittees, Mr. Smith said he “cannot and will not vote” for a bill that “has become an ode to bigotry and ignorance.”
The changes represented a win for the far-right Republicans who have been pressuring Speaker Kevin McCarthy to eschew working with Democrats, and instead cater to the party base, on major pieces of legislation. They spent weeks agitating for reluctant G.O.P. leaders to include the socially conservative amendments in the defense bill debate, ultimately forcing the issue by threatening to block progress on the legislation until they got their way.
The success of those measures on the House floor creates momentum for those members to exploit in future debates over the budget, where the hard right is seeking similar changes across the government.
“It is core and fundamental to defense that we stop making the defense department a social engineering experiment wrapped in a uniform,” Representative Chip Roy, Republican of Texas and one of the ultraconservative ringleaders, said on the floor Thursday.
Nearly all Republicans voted for a measure to restrict funding to allow service members to travel to obtain abortions, which the House adopted 221 to 213, and for another denying transgender troops coverage for gender transition surgeries and hormone therapy, which passed 222 to 211. A measure by Representative Ralph Norman, Republican of South Carolina, that would eliminate all of the Pentagon’s diversity offices and employees, eked through by a narrower margin, 214 to 213.
The House defeated a broader measure by Representative Matt Gaetz, Republican of Florida, that would have prohibited the Pentagon from spending any money on diversity training whatsoever. That measure failed on a vote of 210 to 221.
The votes came amid a heated floor debate in which Republicans and Democrats feuded over issues of race, sex and gender. Representative Eli Crane, Republican of Arizona, at one point made a reference to “colored people” while defending his amendment to keep diversity training from becoming a condition for obtaining or keeping Defense Department jobs. Representative Joyce Beatty of Ohio, a Democrat who is Black, demanded that his comments be stricken from the record, and Mr. Crane later said in a statement that he “misspoke.”
Later in the evening, Representative Jill Tokuda, Democrat of Hawaii, admonished her G.O.P. colleagues for the tenor of the debate.
“From the backwards, racially insensitive comments spoken on this floor, it seems D.E.I. training would be good right here in the halls of Congress,” she said.
The one point of bipartisan consensus on Thursday, it seemed, was widespread opposition to Republican efforts to reduce or eliminate military assistance and weapons shipments for Ukraine.
On a vote of 276 to 147, the House rejected a proposal to ban the Biden administration from sending cluster munitions to Ukraine, with two lawmakers voting present. The Biden administration announced last week that it would be sending the weapons to Kyiv, despite bipartisan concerns that the weapons posed too great a danger to civilians.
The amendment was offered by Representative Marjorie Taylor Greene, Republican of Georgia, who also failed in her effort to strip a $300 million program to train and equip Ukrainian soldiers that has been part of the defense bill for almost a decade. The House rejected that effort by a vote of 341 to 89, alongside a similar proposal by Mr. Gaetz to prohibit Congress from appropriating any more money for Ukraine’s war effort, which was defeated 358 to 70.