WASHINGTON – The GOP-controlled Senate defeated a measure Friday that would have blocked President Donald Trump from launching a military strike against Iran unless he got explicit congressional approval.

The 50-to-40 vote came after a rare congressional debate over war powers and amid escalating tensions between the U.S. and Iran. The measure needed 60 votes to pass. Four Republicans broke ranks to support the measure: Sens. Susan Collins, Mike Lee, Jerry Moran and Rand Paul.

Supporters said the battle would now move to the House, where Democrats hold the majority and have a similar measure in the legislative hopper. And they argued that Friday's vote still marked a significant step in pushing back against Trump's foreign policy.

“A bipartisan majority of the Senate today sent an important message to President Trump: you do not have a blank check to pursue another endless war in the Middle East," said Senate Democratic Leader Chuck Schumer of New York.

As he left the Senate floor Friday afternoon, Sen. Tim Kaine, D-Va., agreed and added that it helps set up the House for success.

"We did not win on this vote but forced the vote to happen. We showed a majority of the Senate believes the president is not the king, and can’t go to war on his own," Kaine said, adding that it puts up some "guardrail against the president doing something stupid."

Kaine pointed to Trump being in Japan for the G-20 summit, which attracts leaders from around the world, and said that it may help cool down the possibility of war. But, he added, "the fact that we were 10 minutes away and the fact that the president said this week that he didn’t need Congress, that should scare everybody. We've got to stay on our toes."

Democrats and some Republicans have grown alarmed by the Trump administration’s rhetoric and actions on Iran.

Trump threatened Iran with “obliteration” on Tuesday, warning that the U.S. would use “overwhelming force” against the country if it attacks “anything American.” And last week, Trump initially authorized a missile strike on the country – in retaliation for Tehran’s downing of a U.S. drone – but the president nixed the military action at the last minute. He said then that he was concerned about Iranian casualties.

This week, Trump has taken a harder line and boasted that any war with Iran would be devastating. "I don't need exit strategies,” he told reporters.

But some lawmakers say a war with Iran would be a prolonged and disastrous conflict – precisely the kind of “endless war” that Trump campaigned against in 2016.

“A war with Iran would be a colossal mistake,” Sen. Tim Kaine, D-Va., said during Thursday’s debate on the measure. Kaine is a chief sponsor of the Senate proposal, along with Sens. Rand Paul, R-Ky., and Tom Udall, D-N.M.

“After 18 years of two wars in the Middle East, both of which where we still have troops deployed, we should not be fomenting, encouraging, blundering toward, rushing into a third war in the Middle East,” said Kaine, who sits on the Senate Armed Services and Foreign Affairs committees.

“It is an America-first idea that we would not want to go and engage in these endless, unfocused, unconstitutional wars,” Rep. Matt Gaetz, a Florida Republican, told Fox News earlier this week. He is co-sponsoring a similar measure in the House with California Democratic Rep. Ro Khanna.

But other Republicans warned that restricting Trump’s military options is a dangerous step that would embolden the Islamic Republican at a time when it’s already threatening the U.S. Top Trump administration officials said last month that "credible intelligence" suggested Iran was preparing to attack American military assets in the region.

“At the very moment that Iran has been stepping up its aggression throughout the Middle East, these senators are proposing radical new restrictions on the administration’s ability to defend U.S. interests and our partners,” Senate Majority Leader Mitch McConnell, R-Ky., said Thursday on the Senate floor.

He argued, for example, that the measure would bar Trump from retaliating against Iran if it attacked Israel. “The president’s hands would be tied,” McConnell said.

Friday's vote was held open for more than 10 hours, a record-breaker, to accommodate several Democrats who are running for president and had to fly back from the Miami debates. Before Friday, the longest vote was held in 2018 to avert a government shutdown.

The Kaine-Udall proposal would have barred the Trump administration from using any Pentagon funding to “conduct hostilities” against the government of Iran, its armed forces or its territory. It would not have prevented the U.S. from responding to an attack on the U.S.

As lawmakers debated possible military action against Iran, European and Iranian diplomats met in Vienna to discuss the fate of the 2015 multilateral nuclear agreement.

Iranian officials said earlier this week they would speed up uranium enrichment and pull back from the nuclear agreement, signed by the U.S. and other world powers to curb Iran’s nuclear program. The Trump administration unilaterally withdrew from that deal more than a year ago – Trump said it wasn’t strong enough.

Iran’s U.N. ambassador said Thursday that its decision to increase uranium enrichment could be reversed if Europe finds a way to side-step crushing economic sanctions the Trump administration has imposed on Iran’s oil industry.

Iran said Friday’s meeting in Vienna was the "last chance" to save the deal, according to Reuters.

Brian Hook, the State Department’s special envoy on Iran, is also in Europe, pressing officials to abandon the deal and join the U.S. in imposing stringent sanctions on Iran.

Contributing: Kim Hjelmgaard and the Associated Press

Iran to speed up enrichment of uranium amid faltering nuclear deal

Former Secretary of State Rex Tillerson told House panel he had to condense issues for inattentive Trump