Updated

WASHINGTON -- The Senate on Tuesday voted to strip money for seven additional F-22 jets from a $680 billion defense bill, after President Obama threatened to veto the entire bill if the money remained.

The 58-40 vote was a win for the White House and, for the moment, prevents Obama from using the first veto of his presidency. The president considered the $1.75 billion addition to the defense bill a waste of money.

But the fight to fund additional F-22 jets is far from over. Because the House passed a version of its defense bill including additional funding, the subject will come up in negotiations to reconcile the two bills.

Obama on Tuesday thanked the Senate for approving the amendment that he says will "better protect our troops."

Obama said he rejected the notion that the country has to "waste billions of taxpayers dollars" on outdated defense projects.

More On This...

"That's why I'm grateful that the Senate voted against an additional $1.75 billion to buy F-22 jets that military experts and members of both parties say we do not need," he said at the White House. "At a time when we're fighting two wars and facing a serious deficit, this would have been an inexcusable waste of money."

Pentagon spokesman Geoff Morrell said Defense Secretary Robert Gates applauded the Senate's vote.

"He understands that for many members this was a very difficult vote, but he believes that the Pentagon cannot continue with business as usual when it comes to the F-22 or any other program in excess to our needs," Morrell said

Gates has said that the Pentagon has enough of the $140 million jets to meet operational needs. But for many lawmakers, the F-22 means thousands of jobs for their state or district, and resistance to ending the program has been fierce.

Click here to view an F-22 slideshow.

The F-22 amendment stripping the funding only needed a simple majority to pass, or 51 votes, meaning no horse-trading for votes was necessary to reach the more difficult threshold of 60 votes often used for controversial legislation.

Sen. Saxby Chambliss, R-Ga., told FOX News that he did not fight for a 60-vote threshold because the support is either there or not. He called the vote "significant" but held to a glimmer of hope for a compromise.

Lawmakers from states that would benefit from manufacturing the jets wanted the money pumped into the aerospace and defense industries. Gates had countered that the money would be better spent on ensuring that the military has the tools it needs to fight the unconventional wars taking place in Iraq and Afghanistan.

Senate Armed Services Committee Chairman Carl Levin, D-Mich., and the top Republican on the panel, Sen. John McCain of Arizona, sponsored the amendment to take out the F-22 money. But strong resistance emerged from lawmakers, particularly from senators representing states where the plane and its parts are made.

According to Lockheed Martin Corp., the main contractor, 25,000 people are directly employed in building the plane, and another 70,000 have indirect links, particularly in Georgia, Texas and California. Sen. Chris Dodd, D-Conn., a supporter of the program, said there are 1,000 suppliers in 44 states.

Supporters of the program also argued that it would undermine the nation's security to terminate the F-22 when China and Russia are both developing fighter jets that can compete with it.

The Senate took up the F-22 issue last week, but then put it aside to deal with two amendments having nothing to do with defense. On Thursday senators voted to adopt a major expansion to hate crimes law, and on Monday they turned to a proposal allowing people with concealed weapons permits in one state to carry their weapons into other states. A vote on the gun law was expected Wednesday.

Its sponsor, South Dakota Republican John Thune, said the permit holder must respect the concealed weapon laws of the state he is visiting, such as bans on firearms in certain locations. There would be no right to carry concealed firearms in the two states that do not allow the practice, Wisconsin and Illinois. The measure is backed by the National Rifle Association and other gun rights groups.

The House last month approved its version of the defense bill with a $369 million down payment for 12 additional F-22 fighters. The House Appropriations Committee last week endorsed that spending in drawing up its Pentagon budget for next year. It also approved $534 million for an alternate engine for the F-35 Joint Strike Fighter, another program that Obama, backed by the Pentagon, says is unwarranted and would subject the entire bill to a veto.

The defense bill authorizes $550 billion for defense programs and $130 billion for military operations in Iraq, Afghanistan and other anti-terrorist operations.

Click here to view video interactive

Click here to view profiles of the F-35.

Click here to view profiles of the F-22.

FOX News' Trish Turner and The Associated Press contributed to this report.