WASHINGTON ― More than one month after President Donald Trump ordered a missile strike that resulted in the death of a top Iranian general, the Senate passed a measure that would limit him from engaging in further hostilities against the country without first getting approval from Congress.

On Thursday, eight Republicans joined all Democrats and Independents in voting to advance a resolution from Sen. Tim Kaine (D-Va.) that would end “hostilities against the Islamic Republic of Iran or any part of its government or military” unless explicitly authorized. It required only a simple majority to clear the chamber.

“While the President does and must always have the ability to defend the United States from imminent attack, the executive power to initiate war stops there. An offensive war requires a congressional debate and vote. This should not be a controversial proposition,” Kaine, a top proponent of reasserting Congress’ role in the war-making process, said in a floor speech ahead of the vote.

While Trump is almost certain to veto the measure, Kaine argued that it could still send a message to the president and potentially influence future decisions on such actions that might bring the country to the brink of war.

Trump’s decision to order a drone strike against top Iranian general Qassem Soleimani at Iraq’s Baghdad airport last month ratcheted up tensions in the region and threatened to pull the U.S. into another bloody war in the Middle East. Iran initially responded with missile strikes on military bases that house U.S. troops in Iraq, but has since held off on further retaliation, at least for now. But questions have arisen about the administration’s initial rationale for the attack, which warned of a vague “imminent” attack on U.S. troops in the region.

Most Republicans vehemently opposed Kaine’s war powers resolution, warning that it would send a signal to Iran’s leadership that the U.S. was not prepared to defend itself abroad in the future. On Thursday, they offered a number of amendments seeking to undermine it or gut it entirely, including one from Sen. Tom Cotton (R-Ark.) that would have created an exemption for military forces deemed to be engaging in operations targeting foreign designated terrorist groups.

But Democrats successfully defeated the amendments with the help of Republicans, including ― Sens. Lamar Alexander of Tennessee, Bill Cassidy of Louisiana, Susan Collins of Maine, Lisa Murkowski of Alaska, Todd Young of Indiana, Mike Lee of Utah and Rand Paul of Kentucky ― who also bucked their party on the final vote on Kaine’s resolution.

The House passed its own identical resolution forbidding the president from attacking Iran unless there’s an imminent threat or Congress declares war. But due to a technical issue, it will likely have to approve the Senate version before Congress can send it to Trump’s desk.