A U.S. Marine carries his weapon at Camp Bost on Sept. 11 in Helmand Province, Afghanistan. (Andrew Renneisen/Getty Images)

The Senate passed its version of a massive defense bill on Monday, setting up negotiations with the House but leaving the most controversial policy issues that lawmakers hoped to address unresolved.

Senators voted 89 to 8 to pass the nearly $700 billion bill, which authorizes support for Pentagon programs and combat operations at home and abroad. Five Democrats and three Republicans — including Senate Foreign Relations Committee Chairman Bob Corker (R-Tenn.) — refused to back the measure, while defense hawks Sens. Lindsey O. Graham (R-S.C.), Marco Rubio (R-Fla.) and Robert Menendez (D-N.J.) did not vote.

By sheer size, the bill is the most comprehensive piece of legislation Congress grapples with in any given year, apart from dealing with the budget. This year, it has enjoyed unique bipartisan support in the Senate.

But part of that harmony is due to the fact that this year’s Senate bill was unfettered by several of the policy fights senators had hoped to wage against the Trump administration, on matters including transgender troops and North Korea.

While the bill authorizes spending on an array of defense programs, lawmakers will take up separate legislation later this year that would appropriate the necessary funds.

Senate leaders were unable to strike a deal to schedule votes on several proposed amendments, meaning that highly anticipated debates over whether to increase sanctions against North Korea and challenge President Trump’s announced ban on transgender troops never happened on the Senate floor.

On Friday, Senate Armed Services Committee Chairman John McCain (R-Ariz.) threw his support behind a free-standing bill that would curtail Trump's proposed transgender ban, which the president announced via Twitter in July.

McCain’s open declaration of opposition to the president’s ban was notable — but also a sign that the measure would likely not be folded into the defense bill.

Senators of both parties also proposed stiffening sanctions against Pyongyang over its latest ballistic missile and nuclear tests, including measures to ban the import of any goods made by North Korean labor and block anyone who does business with North Korea from the U.S. financial system. Those proposals never came up for a vote.

Of the politically controversial matters that arose, the only one to receive a vote was an amendment from Sen. Rand Paul (R-Ky.) to impose a six-month deadline on Congress to pass a new authorization for use of military force (AUMF) against extremist groups. The Senate voted to kill his proposal; even several of Congress's biggest AUMF champions recoiled at setting up a do-or-die situation in which the military could be left without any legal underpinning for combat operations in Afghanistan and the Middle East.

But the Senate's bill does include a few significant policy changes, including a government-wide ban on using Russian firm Kaspersky Labs' software. The measure, presented initially by Sen. Jeanne Shaheen (D-N.H.), goes further than an order that acting Homeland Security Secretary Elaine Duke issued last week, which applied only to federal civilian agencies. The defense bill's ban would also cover the military and government contractors.

Kaspersky Lab has strongly denied it is a conduit for Russian government espionage. "Kaspersky Lab has never helped, nor will help, any government in the world with its cyberespionage or offensive cyber efforts, and it's disconcerting that a private company can be considered guilty until proven innocent, due to geopolitical issues," the company said in a statement last week.

Russia’s mounting aggression, including its attempts to meddle in the 2016 presidential election, inspired several initiatives in both the House and Senate’s defense bills, such as intensified cybersecurity operations, some of which the Trump administration has criticized, and measures designed to stay ahead of Russia in the arms and space race — including a “Space Corps” program the Pentagon has said it doesn’t yet want.

House and Senate lawmakers will wrestle over those issues in the coming weeks, as Congress also debates how much money to commit to the defense programs they are trying to authorize.

The defense bills hike the level of defense spending over the current budget, an infusion lawmakers say is crucial to keeping the military functioning. Congressional hawks including McCain pointed out that the increases attracted broad support this year, earning unanimous votes in the Armed Services Committee.

Congress faces its next budget deadline in December, and it is not clear how much lawmakers will direct toward defense spending.

"For too long our nation has asked our men and women in uniform to do too much with far too little," McCain said Monday, warning that financially, "we are gambling with the lives of the best among us, and we're now seeing the costs."

"This legislation is only part of the solution," he added, referring to the defense bill. "We still have no path to actually appropriate the money that we are about to authorize."

Ellen Nakashima contributed to this report.