The Senate on Tuesday passed its annual defense policy bill, setting up tough negotiations with the House over how to fund military programs and deal with social policy issues concerning women in the draft and LGBT non-discrimination policies.

While the vote in favor of the bill was 85 to 13, negotiations over the legislation grew tense in recent days as members fought to get votes on various contentious proposals. In the end, few of these votes were held, a situation Senate Armed Services Committee Chairman John McCain (R-Ariz.) said was unfortunate.

“As happy as I am about the size of the vote, we left out some really important measures,” McCain said.

The Armed Services chairman sought consideration of a measure that would extend and expand a program providing U.S. visas for Afghan interpreters being targeted by the Taliban for assisting U.S. personnel.

But Sen. Mike Lee (R-Utah) objected to this and and other proposals last week, after McCain refused to put his measure to prevent the indefinite detention of American citizens on the list of amendments to receive a vote.

An angry McCain accused Lee of “literally signing the death warrants” of Afghans who helped U.S. personnel last week.

Failing to find a way to end the standoff, Senate leaders decided to hold a vote on passage and move on to other legislation on the chamber’s agenda.

This meant the Senate never took votes on several measures championed by Democrats, such as Sen. Kristen Gillibrand’s (D-N.Y.) push to reform the way the military handles sexual assaults and Sen. Patty Murray’s (D-Wash.) effort to restore funding to a program allowing servicemembers to freeze their eggs or sperm prior to deployment.

Republicans also missed the chance to offer amendments they deemed critical, such as a measure from Sen. Jerry Moran (R-Kan.) to prevent the Pentagon from using any funds to draw up plans for an alternative facility to the detention center at Guantanamo Bay, Cuba.

“When we take a up a bill of this significance, not every senator can have his or her way, not every senator can have their amendment,” McCain said Tuesday. “So I have to say I blame a few senators that believe it’s their way or the highway.”

Senators filed well over 500 amendments, but just one made it on to the final bill: A deal to allow the federal government to purchase Russian-made rocket engines through 2022, provided the Air Force first proves that the purchases don’t violate sanctions. McCain has long campaigned against the RD-180 engines, arguing the government should be promoting a domestic industry, not providing cash to a Russian industry with close ties to the Kremlin.

The focus now turns to House and Senate negotiations, where the two chambers will have to iron out differences over controversial issues, such as whether women will have to register for the draft, which is included in the Senate bill, and House language that would allow religious organizations with federal contracts to claim an exemption to civil rights rules requiring them to not discriminate on the basis of sexual orientation or gender identity.

A conservative effort in the House to roll back LGBT protections sparked a passionate protest movement last month from Democrats and some Republicans, that is only likely to grow more intense in the wake of the mass shooting at a gay nightclub in Orlando on Sunday.

Negotiators will also have to work through the question of how to fund defense programs through the next fiscal year. The House bill dips into a war funding account to provide an extra $18 billion for Pentagon programs, while the Senate bill keeps to levels set in a budget agreement Democrats and Republicans struck last year.

The White House has issued a veto threat against both the House and Senate bills, for varying reasons, including the House’s reliance on war funds and a rollback of LGBT protections for contractors, and both bills’ efforts to keep the president from closing the detention facility at Guantanamo Bay.

But negotiators are predicting the issue that will take the most time to work out is a difference over how to make major organizational changes at the Pentagon.

The Senate bill goes furthest by proposing to make deep cuts to both the civil staff and high ranking generals, explore reshaping the role of combatant commands, and eliminate the Pentagon’s undersecretary position for acquisition, technology and logistics.

“This legislation is probably the biggest reform enacted by the Senate Armed Services Committee and the Senate since Goldwater-Nichols some 30 years ago,” McCain said, referring to the last major structural overhaul of the Defense Department.

And the question of how to fund defense programs will hang over the entire process.

Should negotiators go with the House-backed proposal that dips further into war funds, it would all but surely set up a situation where the next Congress would have to approve emergency spending by next spring to keep the military’s operations against the Islamic State and in Afghanistan from running out of money.

Democrats said the budgeting fight over the defense bill are a reminder that Congress needs to find a way to soon lift budget caps, known as sequestration, that impact both military and domestic programs.

“Once again we’ve underscored the need to eliminate sequestration,” Senate Armed Services Committee ranking member Jack Reed (D-R.I.) said on Tuesday. “That is staring us straight in the face.”