As the U.S. and Iran inch closer to war, Silicon Valley Rep. Ro Khanna and Sen. Bernie Sanders are proposing new legislation that would restrict President Trump from carrying out his threats to bomb dozens of sites around the country.

The bill, set to be introduced Tuesday, would prohibit any funding for offensive military force in or against Iran without congressional approval — a bid to tamp down escalating tensions in the wake of the U.S. drone strike that killed top Iranian general Qasem Soleimani last week.

A similar measure pushed by Khanna, D-Santa Clara, passed the House with bipartisan support last summer. But it was stripped from the annual defense funding bill that Congress passed in December, in a compromise between the House and Senate Republicans.

“Today, we are seeing a dangerous escalation that brings us closer to another disastrous war in the Middle East,” Khanna and Sanders said in a statement. “A war with Iran could cost countless lives and trillions more dollars and lead to even more deaths, more conflict, more displacement in that already highly volatile region of the world.”

Khanna’s legislation would clarify that the 2001 and 2002 authorizations that Congress passed allowing military force in the Middle East could not be used to justify attacks on Iran. The administration has argued that the strike against Soleimani was allowed under both measures, which were passed in the wake of the 9/11 attacks and later allowed the U.S. invasion of Iraq.

Progressives had criticized the compromise that excluded his amendment from last year’s defense bill, with Khanna describing it as “astonishing moral cowardice.” If the measure had been approved, he argued in an interview Monday, it could have prevented Trump from approving the controversial strike that killed Soleimani and other officials of pro-Iranian Iraqi militias outside the Baghdad airport last week.

But constitutional scholars are divided on that question. The bill included exceptions for an “emergency” created by an attack on U.S. armed forces, and the Trump administration has cited rocket attacks on U.S. bases in Iraq by pro-Iranian militias as a justification for the Soleimani strike.

Rep. Adam Schiff, D-Los Angeles, the chair of the House Intelligence Committee, has endorsed Khanna’s new bill, and House Speaker Nancy Pelosi, D-San Francisco, said the House would vote this week on a separate war powers resolution to block Trump’s moves in Iran.

The strike against Soleimani has inflamed regional tensions, prompting the Iranian government to vow revenge and say it would not comply with any limits on its nuclear program. It also sent hundreds of thousands of protesters in Iraq and Iran into the streets to condemn the U.S.

“The bottom line is, this isn’t making us any safer,” Khanna said. “No one doubts that Soleimani was a bad guy. But should the U.S. be the world’s policeman that goes around taking out bad guys? Or do we have a sense of military restraint, and an understanding that one bad guy can be replaced by another bad guy?”

Trump has threatened to bomb 52 sites in Iran — the number of American hostages Iran took at the U.S. embassy in 1979 — if Iran strikes back against U.S. forces. He’s said the targets include “cultural” sites, which could violate international law.

While Trump has received strong support from Republicans for the drone strike, there’s at least some GOP backing for Khanna’s position. His original amendment that passed last year was co-sponsored by Rep. Matt Gaetz, R-Florida, one of the House’s most conservative and vocally pro-Trump members. It passed the House 251-170, with the support of 27 Republicans.

But “now that the president has taken this action, it becomes harder for those Republicans to go against the president,” Khanna acknowledged.

The Silicon Valley congressman is a national co-chair for Sanders’ presidential campaign. The senator has blasted Trump’s attack on Soleimani, saying “his actions now put us on the path to another war, potentially one that could be even worse than before.”

Sanders also described the strike as an “assassination” of Soleimani — earning the Vermont senator criticism from other Democratic presidential candidates, including Joe Biden and Michael Bloomberg, who called that assertion “outrageous.”