The US Senate voted on Thursday to rein in President Donald Trump from attacking Iran, sharply rebuking his foreign policy despite a week earlier acquitting him in his impeachment trial.

Eight senators of Trump’s Republican Party, which enjoys a majority, bucked their leadership to join Democrats in a resolution that bars any military action against Iran without an explicit vote from Congress.

“The Senate just sent a clear shot across the bow -- a bipartisan majority of senators don’t want the president waging war without congressional approval,” Democratic Senate leader Chuck Schumer said after the vote.

The resolution will head to the Democratic-led House of Representatives, which passed a similar text last month.

But much like an earlier attempt by Congress to end US support for Saudi Arabia’s devastating offensive in Yemen, Trump is nearly certain to issue a veto, with lawmakers lacking the two-thirds majority to overturn it.

Moments before the vote, a rocket slammed into an Iraqi base housing US troops in the first attack on the site since a December 27 barrage killed a US contractor, according to Iraqi and US security sources. There were no immediate reports of casualties.

The contractor’s death set off an escalating crisis in which Trump ordered a drone strike at the Baghdad airport that killed Qassem Soleimani, Iran’s most powerful general.