Defying a White House veto threat, the Senate voted decisively Tuesday to approve a defense policy bill that authorizes $602 billion in military spending, bars shuttering the prison at Guantanamo Bay, Cuba, and denies the Pentagon's bid to start a new round of military base closings.

The GOP-led Senate's version of the National Defense Authorization Act passed 85 to 13, with all but seven members of the Democratic caucus backing the legislation. Six Republicans voted against the bill.

The legislation mandates for the first time in history that young women sign up for a potential military draft. The requirement has angered social conservatives, who fear the move is another step toward the blurring of gender lines akin to allowing transgender people to use public lavatories and locker rooms.

A heated dispute over amendments to the bill left in doubt the future of a program that allows Afghan civilians in danger of being harmed or killed by the Taliban to receive visas and resettle in the United States.

The Republican-led House passed its version of the defense bill last month and lawmakers from both chambers must meet in a conference to resolve differences. The House, for example, excludes the female draft requirement and seeks $18 billion more in spending than the Senate to pay for troops and weapons the Pentagon didn't request.

The defense bills authorize military spending for the fiscal year that begins Oct. 1.

But there is agreement in both chambers on key policy provisions — such as keeping Guantanamo open — that puts Congress on a collision course with President Barack Obama.

During his first campaign for president, Obama promised to close the detention facility at Guantanamo, which he has called a recruiting tool for extremist groups. But Republicans and a number of Democrats have repeatedly thwarted his goal, arguing the prison is critically needed for housing suspected terrorists. The ban on closing the prison also includes a prohibition on moving detainees at Guantanamo to secure facilities in the United States.

The House and Senate also have agreed not to allow military bases to be closed. The Pentagon says the services have vastly more space for training and basing troops than they need, and trimming the surplus would save money better used to strengthen the military.

But Congress won't go along. Military bases are prized assets in local economies and shutting them can cost votes in the next election. Besides, several lawmakers have argued that the Pentagon has cooked the books to justify its conclusions or at least didn't do the math completely.

The White House also opposes provisions in the House and Senate bills that would limit the size of the president's National Security Council staff. According to Republicans, the staff has been micromanaging military operations even though they are supposed to only coordinate policy and advise the president.

Rep. Mac Thornberry, R-Texas, the House Armed Services Committee chairman, said he has personally heard from troops in combat who have received intimidating calls from junior White House staffers.

The Senate bill caps the number of National Security Council staff at 150, while the House would require Senate confirmation of the president's national security adviser if the size of the staff exceeds 100 employees.

The White House has called the limits "arbitrary" and said curbing number of staff number undercuts its ability to assist the president "in an increasingly complicated world," according to the veto message.

Hundreds of potential amendments to the bill weren't considered due to procedural disputes that resulted in gridlock. Sen. John McCain, R-Ariz., the Senate Armed Services Committee chairman, said the stalemate was caused by a few senators who didn't get votes on their amendments and responded by refusing to allow votes on any others.

"Too often throughout this process, a single senator was able to bring the Senate's work on our nationaldefense to a halt," McCain said Tuesday. "This was a breakdown in the decorum of the Senate, and one that will have serious consequences."

The dispute effectively shut down debate on all amendments, leading McCain and other senators to warn of life-or-death consequences if the Senate failed to take up the Afghan visa program.

The Afghans worked for the coalition as interpreters, firefighters and construction laborers. Without the option to leave Afghanistan, they and their families risk being harmed or killed by militants who consider them traitors, the top American commander in Afghanistan has warned.

An amendment authored by Sen. Jeanne Shaheen, D-N.H., would extend the so-called special immigrant visa program through 2017 and authorize an additional 2,500 visas for the fiscal year that begins Oct. 1 to meet the growing demand.

In the House version of the defense bill, lawmakers refused to provide additional visas. The House extended the program for a year, but also narrowly restricted eligibility to Afghans whose jobs took them outside of a military base or secured facility.