The House took a major step Friday in tying President Donald Trump’s hands on war with Iran — one that will be met with major resistance from Senate Republicans.

Lawmakers passed two amendments to the House’s more than $730 billion national defense budget that would restrict Trump’s ability to go to war with Iran without congressional approval, and also put a check on Trump’s relationship with Saudi Arabia, an alliance the administration has been using to escalate tensions with Iran.

These amendments were passed with bipartisan support in the House, as lawmakers of both parties grow increasingly concerned about how much power the executive branch wields in the US’s decisions about war. But they will see major resistance among Senate Republicans, who so far have largely supported giving Trump unfettered war authority when it comes to Iran. Trump has already threatened to veto the House version of the National Defense Authorization Act (NDAA). His administration requested $750 billion for the Pentagon budget — a figure Senate Republicans passed late last month.

That said, the defense bill is seen as a must-do in Congress; it has passed despite deep partisan divisions every year for more than 50 years. And this is a major win for antiwar activists in gaining leverage in negotiations as House and Senate lawmakers hash out a final defense budget.

“This is the only way to stop Trump from starting another costly war. Constitutional rights aren’t optional and endless war isn’t inevitable,” Rep. Ro Khanna (D-CA), the amendments’ sponsor, said in a statement.

How the House is trying to stop war with Iran

For months, progressive lawmakers and activists have been plotting their next move to hold Trump accountable in the Middle East. As Vox reported in June, their strategy has been to tie Trump’s hands by using the NDAA — a massive military budget bill that presidents are typically reluctant to veto.

There are two amendments that would place accountability on Trump over Iran. One, led by Khanna and Rep. Matt Gaetz (R-FL), would block funding for any war with Iran that has not been authorized by Congress, and notably clarify that existing war authorities that Congress passed in the aftermath of 9/11 authorizing military action against al-Qaeda and any related organization, are not legal justification for war with Iran. The amendment still retains the president’s powers under the War Powers Resolution, which allows the president to go to war in case of “a national emergency created by attack upon the United States, its territories or possessions, or its armed forces.”

More than two dozen Republicans — conservatives concerned about Congress’ war power authority being ceded to the executive branch — voted in favor of this amendment with a 250-170 final tally.

This is especially important as tensions with Iran have continued to escalate since Trump withdrew from the international nuclear deal last year, culminating with the downing of a US military drone and Trump nearly launching a military strike last month. The administration has also attempted to make connections between Iran and al-Qaeda. “Iran better be careful,” Trump said Friday, according to the White House press pool, continuing his aggressive rhetoric. “They’re treading on very dangerous territory.”

That said, Republicans in the Senate haven’t been as supportive of this measure. A similar measure was voted down in Congress’s upper chamber late June, winning the support of only four Republican senators.

The second amendment, also led by Khanna, mandates the US military withdraw aid to the Saudi-led coalition’s war in Yemen, a brutal humanitarian crisis impacting tens of millions in the region. This amendment mirrors the War Powers Resolution Congress passed in April, which Trump vetoed, signaling his commitment to the US’s longstanding alliance with the Saudis — but also his personal relationship with Saudi Crown Prince Mohammed bin Salman (the same MBS who called for Saudi Washington Post journalist Jamal Khashoggi’s killing). Since vetoing the war powers resolution, Trump has escalated tensions with Iran and sidestepped Congress to unilaterally authorize $8 billion in arms sales, including to Saudi Arabia and its allies to counter Iran.

Going into final negotiations, House Majority Leader Steny Hoyer told Vox getting these two amendments in the final defense budget was “important” to House Democratic leaders, and a priority. Already, tensions between chambers over the NDAA are high, and this will only make the stakes higher as the defense budget becomes a debate not only over military funding, but also about the balance of powers between Congress and the president on matters of war.