That means President Barack Obama won't be forced to veto the legislation and drag out for several more weeks an ugly battle with the GOP-controlled Congress over the accord he has fought hard to secure.
The vote on the procedural motion to move to a final vote, which needed 60 votes to pass, failed 58 to 42.
Obama welcomed the outcome in a statement Thursday afternoon.
"This vote is a victory for diplomacy, for American national security, and for the safety and security of the world," Obama said. "I am heartened that so many senators judged this deal on the merits, and am gratified by the strong support of lawmakers and citizens alike."
While Senate Republicans are working on a revote on the measure next week to put additional pressure on Democrats, and the House has also planned several votes against the deal, sufficient congressional support has been secured for its implementation.
After the Senate vote Thursday, the House passed a resolution on a straight party vote stating that the President failed to comply with the law on the Iran nuclear deal because he didn't provide Congress with details on so-called "side deals" governing inspections of possible nuclear sites.
The non-binding measure was approved 245-186 and could lay the groundwork for a future legal challenge against the Obama administration.
Illinois Republican Rep. Peter Roskam, who led the charge on the GOP resolution, told CNN he expects that in addition to legal action Republicans will move to pass new sanctions legislation. He predicted it would get to the President's desk and force him again to defend the nuclear deal.
"If you've got a majority of the Congress that doesn't like the Iran deal, that begins to suggest you've got a majority of Congress that wants to lean in on this and be more provocative," he said.
But the House action won't prevent the Iran agreement from going through later this month because of the earlier Senate vote blocking the Republican effort to scuttle the deal.
House Republicans are charging that the White House violated a law requiring it give Congress all the information concerning the deal it brokered with Iran in July, since it did not deliver the details arrangements on inspections between Tehran and the U.N.'s International Atomic Energy Agency, which are traditionally kept secret.
The Senate vote was a victory for the White House, after it heavily leaned on Democrats to back the deal. It is also an achievement for Senate Democratic Leader Harry Reid and Sen. Dick Durbin, the No. 2 Democrat in charge of whipping votes, who worked for weeks to ensure wavering Democrats would back the deal and stick together on the important procedural vote.
Some Democrats struggled with whether to block the vote, especially after Republicans vigorously argued a pact of such historical magnitude deserved a final up-or-down vote.
"The idea they would filibuster a process they voted for unanimously just a few short months ago is going to be a hard thing to sell," said Sen. John Cornyn, the No. 2 Republican leader, who argued Democrats had voted earlier in the year to give Congress a say over the deal with Iran but now are blocking a final vote on it.
Senate Majority Leader Mitch McConnell took steps after the defeat to set up another vote on the measure next week. The thinking is that members like Colorado Sen. Michael Bennet and other vulnerable Democrats up for re-election next year might change their votes if they get blowback from their constituents.
"They told us this was an issue too important for political games," McConnell said of Democrats on the Senate floor after the vote. "But that was last week, apparently."
A top aide to Reid, however, said Democrats don't expect any votes to change if Republicans pursue this strategy.
The four Democratic senators who previously expressed opposition to the Iran deal -- New York's Chuck Schumer, Maryland's Ben Cardin, West Virginia's Joe Manchin and New Jersey's Robert Menendez -- voted for ending the filibuster to allow a final vote.
Meanwhile, Republicans in the House are continuing to pursue an effort to sink the deal, with the vote Thursday afternoon just one of three it has slated on the deal.
House Speaker John Boehner said ahead of the vote that Obama violated the law because he didn't give Congress all the information on the Iran nuclear deal and said congressional Republicans may take legal action to block the agreement.
"That is an option that is very possible," Boehner said about a lawsuit.
Boehner vowed the fight was just beginning, telling reporters at his weekly press conference, "This is a bad deal with decades-long consequences for the security of the American people and our allies, and we'll use every tool at our disposal to stop, slow and delay this agreement from being fully implemented."
Asked whether the White House was concerned about a possible Republican lawsuit over the release of further details on the agreement, White House spokesman Josh Earnest said, "What we feel confident in, is that after Sept. 17, Congress' opportunity to spoil this agreement will have expired, and we'll be able to move forward with the international community to implement the agreement to prevent Iran from obtaining a nuclear weapon."
While Senate Republicans criticized Democrats for blocking an up-or-down vote on the deal, Reid said that a vote on whether to end debate amounted to a vote on the deal itself.
"Let's be clear about who is moving to end debate: it is the Republican leader and he alone who is moving to end debate. It is the Republican leader who filed a procedural motion last night to end debate," Reid said in a statement ahead of the vote.
Earlier in the week, conservatives in the House and Senate split with Republican leaders
, whom they have accused of "showboating" on the issue. The maneuver led to the series of votes the House has scheduled to oppose the deal and to lay the groundwork for a lawsuit against Obama.
Like the Senate, House Democrats have been largely supportive of the White House's deal.
House Democratic Leader Nancy Pelosi called the President's handling of the debate and efforts to get it through Congress "masterful" and "dazzling."
"This is historic, this is grand, this is visionary, this is about peace. Some of our members are saying this is the first time since I've been here I've been able to vote for peace rather than against war," Pelosi told reporters at her weekly news conference ahead of the Thursday votes.
Lawmakers are facing a Sept. 17 deadline for action before the deal automatically takes effect -- 60 days from when the deal was presented to Congress -- but even that deadline has been disputed by conservatives.