"After almost two decades of fighting with no end in sight, Americans are tired of never-ending wars," Nate Anderson, executive director of Concerned Veterans for America, said in a statement. "This amendment begins to reassert Congress's constitutional role in matters of war and peace."

Nothing in the amendment would prevent Trump from defending the United States or its allies against Iran and it would not curtail the president's powers under the War Powers Resolution. Now lawmakers must now decide whether it will be included in the final version of the bill when it goes to conference.

"It should come as no surprise that when the votes were cast, military veterans in Congress – both Democratic and Republican – were overwhelmingly in the yes column," Will Goodwin, director of government relations for VoteVets, said in a statement.

Both Concerned Veterans for America and VoteVets have long argued that Congress needs to take back its power to declare war from the executive branch and put an end to the "Forever Wars" by revoking the 2001 authorization for use of military force against Al Qaeda, which presidents have used to justify military operations all over the world.

"VoteVets, working in coordination with the Concerned Veterans for America, have been lobbying nonstop to see this through – polling briefings, one-on-one meetings, and lots of late-night phone calls," Goodwin said. "We will continue to work overtime to make sure that the amendment makes it through conference committee and is in the final bill passed through Congress."

One of the most outspoken advocates for reining in Trump's ability to attack Iran has been Rep. Seth Moulton (D-Mass.), a Marine veteran who is running for president.

Moulton, who deployed to Iraq four times, has accused National Security Advisor Ambassador John Bolton of trying to persuade the president to invade Iran and overthrow its government. He has also said that the U.S. military is at risk of stumbling into a war with Iran as Trump continues to ratchet up the pressure.

"Look, I fought Iranians when I was in Iraq," Moulton told reporters on Wednesday. "We will fight them again if we have to. But war right now is not necessary. None of us underestimate the threat that Iran poses. None of us would hesitate to use force if it led to a lasting peace."

"We know war with Iran would be bloody and young Americans in the community we represent would pay the highest price. All of us came to Congress for a debate like this one."