WASHINGTON ― The Senate’s Republican majority defeated a war authorization measure Friday meant to bar President Donald Trump from launching a military strike against Iran without Congress’s permission.

The 50-40 vote came after President Donald Trump said on the sidelines of the Group of 20 summit in Japan that “there’s no rush” to ease tensions with Iran, which escalated since Iranian forces shot down an unmanned surveillance drone.

“There’s absolutely no time pressure,” he added. “I think that in the end, hopefully, it’s going to work out. If it does, great. And if doesn’t, you’ll be hearing about it.”

The measure needed 60 votes to pass, but only Republican Sens. Susan Collins, of Maine; Mike Lee, of Utah; Jerry Moran, of Kansas, and Rand Paul, of Kentucky, voted “yea" with the Democratic minority. Nine Republicans did not vote, including Senate Armed Services Committee chairman Jim Inhofe, R-Okla.

The timing of the 10-hour vote was meant to allow participants in the first 2020 Democratic primary debates, in Florida, to return to Washington.

The vote capped the first debate and vote in the Senate in a long time to take war authority back from the executive branch. Trump asserted this week that he doesn’t need congressional approval to strike Iran.

“We’ve been keeping Congress abreast of what we’re doing ... and I think it’s something they appreciate,” Trump told The Hill. “I do like keeping them abreast, but I don’t have to do it legally.”

Lawmakers from both parties have grown alarmed with Trump’s rhetoric; he threatened this week to use “overwhelming force” against Iran if it attacks “anything American.” Trump also confirmed he aborted a military strike against Iranian missile batteries and radars with minutes to spare, saying he was worried about Iranian casualties.

Some lawmakers say a war with Iran would be too costly in terms of the lives of U.S. troops and in federal dollars. Democrats especially have accused the administration of a scattershot strategy and warned the U.S. could stumble into a war through a miscalculation or otherwise.

“For the record, I believe that a war with Iran would be a colossal mistake,” Sen. Tim Kaine, D-Va., and a member of both the Senate Armed Services and Foreign Relations committees, said in a Senate floor speech Thursday.

“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. It would suck lives and resources away from more pressing priorities of our citizens,” Kaine said.

Kaine co-sponsored an amendment with Sen. Tom Udall, D-N.M., to require the approval of Congress for the use of military force against Iran. The president would be allowed to use force without Congress’s express approval in the event of an attack on the U.S., its territories or possessions, or its armed forces.

Republican Rep. Matt Gaetz, of Florida, and Democratic Rep. Ro Khanna, of California, have introduced a similar measure as an amendment to the House version of the 2020 National Defense Authorization Act. The bill will be up for a floor debate in early July.

"This amendment affirms what President Trump knows and believes: unfocused, unconstitutional, unending wars in the Middle East make America weaker, not stronger,” Gaetz said in a statement.

“The United States must be strong in its approach to Iran, and I applaud President Trump for acknowledging that strength can be demonstrated through mindful restraint. Iran must be prevented from obtaining a nuclear weapon and threatening international peace, but Congress must resolve to ensure that any military action is carried out Constitutionally."

Other Republicans say it would be a mistake to limit Trump’s options in the midst of the crisis with Tehran. Senate Majority Leader Mitch McConnell, R-Ky., said the Udall amendment was a partisan shot at Trump that would undermine the administration’s campaign to pressure Tehran to abandon its uranium enrichment and missile programs.

McConnell has called the vote a symptom of Democrats’ “Trump Derangement Syndrome,” which he explained as whatever the president’s for “they seem to be against.”

“This is a terrible idea at any moment, let alone as Iran is escalating its violence and searching for any sign of American weakness,” McConnell said in a floor speech Thursday. “So I would ask my colleagues: do not embolden Iran, do not weaken our deterrents, do not undermine our diplomacy, do not tie the hands of our military commanders.”

The unusual day-long Friday vote was the result of a bipartisan compromise between Senate leaders. McConnell granted it to end a partisan standoff with Democrats who had threatened to deny McConnell the votes to close debate on the Senate version of the NDAA before the weeklong July 4 recess. (That NDAA passed Thursday and would have been amended retroactively.)

Also on Friday, senior officials from Iran and the remaining signatories to its 2015 nuclear deal with world powers were meeting as tensions in the Persian Gulf simmer and Tehran is poised to surpass a uranium stockpile threshold, posing a threat to the accord.

The 2015 agreement aimed at curbing Iran’s nuclear ambitions in exchange for relief from economic sanctions. The United States withdrew from the accord last year and has imposed new sanctions on Iran to cripple its economy, in hopes of forcing Tehran into negotiating a wider-ranging deal.

European countries are pressing for Iran to comply in full with the accord, though they have not specified what the consequences would be of failing to do so. But Iranian officials maintain that even if it surpasses the limit, it would not be breaching the deal, and say such a move could be reversed quickly.

The Europeans also face a July 7 deadline set by Tehran to offer long-promised relief from U.S. sanctions, or Iran says it will also begin enriching its uranium closer to weapons-grade levels.

On Thursday, U.S. Special Representative for Iran Brian Hook met with top European diplomats in Paris. He told The Associated Press that he wants them to get tougher on Iran, instead of clinging to the nuclear deal.

War with Iran is “not necessary,” Hook said.

“We are not looking for any conflict in the region,” he said. But if the U.S. is attacked, “we will respond with military force.”

U.S. is trying to drum up support for an international naval force in the Persian Gulf, notably to protect shipping.

The Associated Press contributed to this report.