U.S. Rep. Matt Gaetz was among a small group of Republicans who joined Democrats in a vote meant to limit the president's powers to use military force.

The War Powers Resolution was put forward by House Speaker Nancy Pelosi, who said the measure is meant to limit President Donald Trump's ability to wage war with Iran.

However, legal analysis of the bill, including one done by the legal blog Lawfare, have concluded that even if it passes both houses of Congress, it does not carry the force of law because it is not subject to presidential signature or veto.

The resolution passed in a 224-194 vote Thursday evening, with only three Republicans supporting it, including Gaetz. The congressman who represents Northwest Florida has been a vocal supporter of Trump, often touting the president's policies on cable news and on social media.

The vote came two days after Iran's retaliation for the U.S. killing of Qasem Soleimani, a top general in Iran's Islamic Revolutionary Guard Corps. Iran launched ballistic missiles at two Iraqi airbases that house U.S. and coalition forces.

Trump sought to ease tensions on Wednesday by not responding militarily and instead announcing greater economic sanctions on the Iranian government.

"I support the president," Gaetz said on the House floor Thursday. "Killing Soleimani was the right decision, but engaging in another forever war in the Middle East would be the wrong decision, and that's why I'm voting for this resolution."

Gaetz said the resolution was not a critical move against Trump.

"I take a back seat to no member of this body when it comes to defending the president," Gaetz said. "This resolution offers no criticism of the president, no critique. It doesn't criticize the president's attack on Soleimani. As a matter of fact, this resolution doesn't even say Soleimani's name in it.

Pointing out he represents more military members than any other member of the House, Gaetz said Congress has the duty to speak to matters of war and peace.

"If the members of our armed services have the courage to go fight and die in these wars, as Congress, we ought to have the courage to vote for them or against them," Gaetz said. "And I think it's ludicrous to suggest that we are impairing the troops from doing their job by not doing our job articulated in the Constitution to speak to these matters of war and peace."

Jim Little can be reached at jwlittle@pnj.com and 850-208-9827.