WASHINGTON — The Senate overwhelmingly approved a sweeping, $631 billion defense bill Tuesday that sends a clear signal to President Barack Obama to move quickly to get U.S. combat troops out of Afghanistan, tightens sanctions on Iran and limits the president's authority in handling terror suspects.

Ignoring a veto threat, the Senate voted 98-0 for the legislation that authorizes money for weapons, aircraft and ships and provides a 1.7 percent pay raise for military personnel. After a decade of increasing Pentagon budgets, the vote came against the backdrop of significant reductions in projected military spending and the threat of deeper cuts from the looming "fiscal cliff" of automatic spending cuts and tax increases.

The bill reflects the nation's war-weariness after more than a decade of fighting in Afghanistan, the messy uncertainty about new threats to U.S. security and Washington belt-tightening in times of trillion-dollar-plus deficits. Spending solely on the base defense budget has nearly doubled in the past 10 years, but the latest blueprint reins in the projected growth in military dollars.

The bill would provide some $526 billion for the base defense budget, $17 billion for defense programs in the Energy Department and about $88 billion for the war in Afghanistan. House and Senate negotiators must reconcile their competing versions of the bill in the next few weeks.

"The major challenge is time," Senate Armed Services Committee Chairman Carl Levin, D-Mich., told reporters after the vote.

Reacting to the relentless violence in Syria, the Senate voted 92-6 to require the Pentagon to report to Congress on the ability of the U.S. military to impose a no-fly zone over Syria.

Sen. John McCain, R-Ariz., who has pushed for greater U.S. military involvement to end the Syrian civil war, sponsored the amendment. Obama on Monday warned Syrian President Bashar Assad not to use chemical and/or biological weapons against his people as the U.S. and its allies weigh military options.

"If military action has to be taken to prevent sarin gas to be used, Congress has to be involved," McCain said.

But Sen. Rand Paul, R-Ky., said it was a "bad idea to discuss contingency plans for war."

The amendment specified that it should not be construed as a declaration of war or an authorization to use force.

Last year, Obama and congressional Republicans agreed on nearly $500 billion in defense cuts over 10 years. If the two sides fail in the next month to avert the "fiscal cliff" the Pentagon would face an additional $55 billion in automatic, across-the-board cuts after the first of the year.

Not far from the Capitol, a coalition of retired military leaders, administration officials and lawmakers pleaded with the president and Congress to address the nation's debt, calling it the greatest threat to national security. The group of prominent Republicans and Democrats said the United States can spend less on defense while still maintaining its military superiority.

"A strong economy and strong national security are inextricably linked," said retired Adm. Mike Mullen, the former chairman of the Joint Chiefs of Staff.

The administration has threatened to veto the Senate bill, strongly objecting to a provision restricting the president's authority to transfer terror suspects from the U.S. prison at Guantanamo Bay, Cuba, to foreign countries. The provision is in current law.

The Senate also voted to restrict the transfer of detainees held at Guantanamo to prisons in the United States.

Further stoking the debate over U.S. detention policy – and setting up a fight with the House – the Senate also added a provision saying the government may not detain a U.S. citizen or legal resident indefinitely without charge or trial even if there is a declaration of war or the authorization to use military force.

Current law denies suspected terrorists, including U.S. citizens seized within the nation's borders, the right to trial and subjects them to the possibility they would be held indefinitely. It reaffirms the post-Sept. 11 authorization for the use of military force that allows indefinite detention of enemy combatants.

That provision had created a conservative backlash, and a coalition of liberal Democrats and libertarian Republicans pushed for the new provision.

The bill sends a clear message to Obama and the military to accelerate the withdrawal of U.S. combat forces from Afghanistan. On a strong bipartisan vote of 62-33 last week, the Senate endorsed Obama's timetable to withdraw all combat troops by the end of 2014 but pressed for a quicker pace, without specifying how that would be achieved.

Obama and the military are engaged in high-stakes talks about the pace of drawing down the 66,000 U.S. combat troops there now.

The bill added stringent new sanctions on Iran's energy and shipping sectors in a fresh attempt to hobble the Islamic Republic's economy and hamper its nuclear ambitions.

The sanctions build upon penalties that Congress has passed – and Obama has implemented – that target Tehran's financial and energy sectors.

Officials in Washington argue that the sanctions have undermined Tehran's economy and robust oil sales, thwarting its suspected pursuit of a nuclear weapon. Iran insists its nuclear program is for peaceful purposes.

Sens. Bob Menendez, D-N.J., and Mark Kirk, R-Ill., who have shepherded sanctions bills through Congress, sponsored the latest package that also would close a major loophole – the ability of Iran to circumvent sanctions and barter oil for precious metals. Turkey has been bartering gold for oil.

The sanctions would designate Iran's energy, port, shipping and ship-building sectors as "entities of proliferation" and prohibit transactions with these areas. The legislation also would penalize individuals selling or supplying commodities such as graphite, aluminum and steel to Iran, all products that are crucial to Tehran's ship-building and nuclear operations.

The administration had complained that the new sanctions were duplicative and unnecessary.

Also on HuffPost:

Loading Slideshow...
  • Chuck Hagel (February 2013 - Present)

    New Secretary of Defense Chuck Hagel is greeted as he arrives for his first day at the Department of Defense, on February 27, 2013 in Arlington, Va. (Photo by Drew Angerer/Getty Images)

  • Leon Panetta (July 2011 - February 2013)

    Secretary of Defense Leon E. Panetta pauses while speaking during a ceremonial swearing-in at the Department of Defense July 22, 2011 in Washington. (Source: <a href="http://www.defense.gov/specials/secdef_histories/">Department of Defense</a>)

  • Robert Gates (Dec. 2006 - July 2011)

    Robert Gates speaks during his ceremonial swearing in as the 22nd defense secretary on Dec. 18, 2006 at the Pentagon. (Source: <a href="http://www.defense.gov/specials/secdef_histories/">Department of Defense</a>)

  • Donald Rumsfeld (Jan. 2001 - Dec. 2006)

    U.S. Secretary of Defense Donald Rumsfeld holds his press conference at the Pentagon briefing room on Jan. 26, 2001 in Arlington, Va. (Source: <a href="http://www.defense.gov/specials/secdef_histories/">Department of Defense</a>)

  • William Cohen (Jan. 1997 - Jan. 2001)

    Secretary of Defense designate William Cohen testifies during confirmation hearings before the Senate Armed Services Committee on Jan. 22, 1997 in Washington. (Source: <a href="http://www.defense.gov/specials/secdef_histories/">Department of Defense</a>)

  • William Perry (Feb. 1994 - Jan. 1997)

    U.S. Defense Secretary William Perry points to a reporter during a press conference on April 21, 1994 in Seoul, Korea. (Source: <a href="http://www.defense.gov/specials/secdef_histories/">Department of Defense</a>)

  • Les Aspin (Jan. 1993 - Feb. 1994)

    U.S. Secretary of Defense Les Aspin released new regulations governing gays in the military during a press on Dec. 22, 1993 at the Pentagon. (Source: <a href="http://www.defense.gov/specials/secdef_histories/">Department of Defense</a>)

  • Dick Cheney (March 1989 - Jan. 1993)

    U.S. Defense Secretary Dick Cheney (L) meets Egypt's President Hosni Mubarak, on April 3, 1989, at Washington. (Source: <a href="http://www.defense.gov/specials/secdef_histories/">Department of Defense</a>)

  • Frank Carlucci (Nov. 1987 - Jan. 1989)

    U.S. Defense Secretary Frank Carlucci testifies before the Senate Armed Services Committee on July 13, 1988 in Washington. (Source: <a href="http://www.defense.gov/specials/secdef_histories/">Department of Defense</a>)

  • Caspar Weinberger (Jan. 1981 - Nov. 1987)

    Caspar Weinberger, Secretary of Defense on Feb. 9, 1981. (Source: <a href="http://www.defense.gov/specials/secdef_histories/">Department of Defense</a>)

  • Harold Brown (Jan. 1977 - Jan. 1981)

    General Alexander M. Haig, right, retired as NATO commander, walks with Defense Secretary Harold Brown during an awards ceremony on July 3, 1979 at Fort Myer, Va. (Source: <a href="http://www.defense.gov/specials/secdef_histories/">Department of Defense</a>)

  • Donald Rumsfeld (Nov. 1975 - Jan. 1977)

    A 1976 photo of Secretary of Defense Donald Rumsfeld. (Source: <a href="http://www.defense.gov/specials/secdef_histories/">Department of Defense</a>)

  • James Schlesinger (July 1973 - Nov. 1975)

    Israeli Defense Minister Moshe Dayan, left, with Secretary of Defense James R. Schlesinger, chats on Friday, Jan. 5, 1974 at the Pentagon. (Source: <a href="http://www.defense.gov/specials/secdef_histories/">Department of Defense</a>)

  • Elliot Richardson (Jan. 1973 - May 1973)

    Elliot L. Richardson speaks to newsmen Oct. 23, 1973 at a press conference held at the Department of Justice. (Source: <a href="http://www.defense.gov/specials/secdef_histories/">Department of Defense</a>)

  • Melvin Laird (Jan. 1969 - Jan. 1973)

    Secretary of Defense Melvin R. Laird as he departed from Andrews Air Force Base Md., for Paris on Jan. 5, 1971 in Washington. (Source: <a href="http://www.defense.gov/specials/secdef_histories/">Department of Defense</a>)

  • Clark Clifford (March 1968 - Jan. 1969)

    This is an Oct. 1968 photo of Secretary of Defense Clark Clifford as he announces his support for President Johnson's decision to halt the bombing of North Vietnam. (Source: <a href="http://www.defense.gov/specials/secdef_histories/">Department of Defense</a>)

  • Robert McNamara (Jan. 1961 - Feb. 1968)

    PARIS, FRANCE: US Secretary of Defense Robert McNamara smiles as he arrives 27 November 1965 at Paris' NATO headquarters. (Source: <a href="http://www.defense.gov/specials/secdef_histories/">Department of Defense</a>)

  • Thomas Gates (Dec. 1959 - Jan. 1961)

    Secretary of Defense Thomas S. Gates Jr., center, poses with Benjamin M. McKelway, left, editor of the Washington Evening Star and President of the AP, and AP General Manager Frank J. Starzel at the April 25, 1960 meeting of the Associated Press in New York. (Source: <a href="http://www.defense.gov/specials/secdef_histories/">Department of Defense</a>)

  • Neil McElroy (Oct. 1957 - Dec. 1959)

    Defense Secretary Neil McElroy said he has "fullest confidence that the United States is ahead of the Soviets..." prior to the announcement of the Soviet's achievement in launching the first earth satellite, Oct. 4, 1958. (Source: <a href="http://www.defense.gov/specials/secdef_histories/">Department of Defense</a>)

  • Charles Wilson (Jan. 1953 - Oct. 1957)

    Charles E. Wilson, left, takes the oath of office from Chief Justice Fred Vinson at the White House in Washington on Dec. 21, 1950 as head of the office of Defense Mobilization. (Source: <a href="http://www.defense.gov/specials/secdef_histories/">Department of Defense</a>)

  • Robert Lovett (Sept. 1951 - Jan. 1953)

    Gen. Dwight D. Eisenhower (right) watches President Harry S. Truman and Gen. Omar Bradley help Defense Secretary Robert Lovett (left) get in place as the men posed on the south lawn of the White House on June 1, 1952 in Washington. (Source: <a href="http://www.defense.gov/specials/secdef_histories/">Department of Defense</a>)

  • George Marshall (Sept. 1950 - Sept. 1951)

    Anna M. Rosenberg, New York Labor and Public Relations consultant, who is named assistant secretary of defense, chats with Secretary of Defense George Marshall in a conference at the Pentagon on Nov. 9, 1950 in Arlington, Va. (Source: <a href="http://www.defense.gov/specials/secdef_histories/">Department of Defense</a>)

  • Louis Johnson (March 1949 - Sept. 1950)

    Defense Secretary Louis Johnson (right) gives new identification card to President Harry Truman at the White House on Nov. 9, 1949 in Washington, listing him as commander in chief for an "indefinite" term. (Source: <a href="http://www.defense.gov/specials/secdef_histories/">Department of Defense</a>)

  • James Forrestal (Sept. 1947 - March 1949)

    James V. Forrestal, Secretary of Defense under President Harry Truman, is shown on July 26, 1947. (Source: <a href="http://www.defense.gov/specials/secdef_histories/">Department of Defense</a>)