WASHINGTON (Reuters) - The U.S. Senate passed legislation on Thursday to limit President Donald Trump’s ability to wage war against Iran, rebuking him weeks after a strike against an Iranian military commander and Tehran’s retaliation raised fears of broader regional conflict.

Eight of Trump’s fellow Republicans joined Democrats to pass the war powers resolution by 55-45. The measure would require Trump to remove U.S. troops engaged in hostilities against Iran unless Congress declares war or passes a specific authorization for the use of military force.

Trump has promised a veto, and there is not expected to be enough support to muster the two-thirds Senate super majority to override. Fifty-three of the 100 senators are Republicans, who rarely break with the president.

Senators voted nearly along party lines a week ago to acquit Trump of impeachment charges, after an investigation and trial that underscored Washington’s bitter partisan divides.

Opponents said the resolution’s passage sent the wrong message.

“We need to send a message of firmness, and not weakness,” said Senator Jim Risch, the Republican chairman of the Senate Foreign Relations Committee.

Democratic Senator Tim Kaine, author of the resolution, said the vote showed strength and reflected the importance of Congress weighing in on any decision to deploy troops.

Slideshow ( 7 images )

Even if the Senate cannot override a veto, Kaine said the resolution’s backers hoped it would influence Trump when it came to future military action, adding that the president cared about what the public thinks, if not the Senate.

“The bill getting to his desk is an indication that we’re listening to our constituents, and we’re telling him blundering into another war would be a bad idea,” Kaine told a news conference after the vote.

The bill’s supporters noted that they were gaining more support for efforts to take back Congress’ authority to declare war. The Constitution gives that power to Congress, not the president, but presidents from both parties in recent decades have expanded the White House’s authority to pursue military action without legislators’ input.

Republican Senator Todd Young, who voted for the resolution, said it should not have been necessary, but Congress had for years “attempted to pass the buck” to the president when decisions about military action had to be made.

“It’s time to do our job,” Young said in a statement explaining his vote that also praised Trump’s leadership.

In June, another resolution that would have required Trump to get Congress’ permission before striking Iran failed in the Senate.

Congress in July failed to override Trump’s veto of legislation opposing the president’s declaration of an emergency to allow the sale of billions of dollars worth of weapons to Saudi Arabia, despite lawmakers objections.

The Democratic-controlled House of Representatives last month passed a war powers resolution similar to the one the Senate approved on Thursday, also by less than a two-thirds super majority. But there are enough differences between the Senate’s version and the House’s that it must pass that chamber again before it can be sent to Trump’s desk.