Sen. Bernie Sanders (I-Vt.) and Rep. Ro Khanna (D-Calif.) on Friday introduced legislation that would block funding for any offensive military force in or against Iran without prior congressional authorization.

The legislation from the lawmakers, two of the most progressive members of their respective chambers, came after the U.S. launched an airstrike in Baghdad that killed Qassem Soleimani, Iran's top general. The attack, and Tehran's vows of retaliation, sparked fears that the already combustible situation in the Middle East could lead to a war between the U.S. and Iran.

"Today, we are seeing a dangerous escalation that brings us closer to another disastrous war in the Middle East," the lawmakers 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.

"At a time when we face the urgent need to rebuild our crumbling infrastructure, to build the housing we desperately need, and to address the existential crisis of climate change, we as a nation must get our priorities right," they added. "We must invest in the needs of the American people, not spend trillions more on endless wars."

The legislation to restrict funds for military action against Iran was passed last year in the House but was later stripped from the National Defense Authorization Act (NDAA) adopted by Congress last month.

Sen. Tim Kaine (D-Va.) also introduced a privileged resolution Friday that would require any hostilities with Iran to be explicitly authorized by a congressional declaration of war or a specific authorization for the use of military force.

The airstrike killing Soleimani has sharply divided Congress, with Republican allies of the president lauding the attack and Democrats saying the White House would need congressional authorization for any broader military action against Iran.

"The president does not have the authority for a war with Iran," Senate Minority Leader Charles Schumer (D-N.Y.) said on the Senate floor Friday. "If he plans a large increase in troops and potential hostility over a longer time, the administration will require congressional approval and the approval of the American people."

Trump defended the strike against Soleimani on Friday, saying the Iranian general was responsible for the killing or wounding of "thousands" of Americans and was "plotting to kill many more."

The Iranian general, a long-feared adversary, was in charge of directing Iranian proxies across the Middle East, including several Shiite militias in Iraq.