The US Senate voted on Thursday to restrain president Donald Trump from attacking Iran, rejecting his foreign policy.

Eight Republican senators joined Democrats in the 55-45 vote. The resolution, which limits US military actions against Iran, will head to the Democratic-led House of Representatives, which passed a similar text last month.

Trump, however, is likely to issue a veto, and two-thirds votes in the House and Republican-run Senate would be needed to overturn it.

“What the American people and the entire world will see from the debate we’re about to have in the Senate is that there is abundant support for the United States taking tough positions with regard to Iran’,’ Republican Senator Mike Lee said. He supports Trump’s foreign policy, but says the Congress has a responsibility to act on matters of war and peace.

“And as part of that, we want to make sure that any military action that needs to be authorised is in fact properly authorised by Congress. That doesn’t show weakness. That shows strength”, Lee added.

Moments before the vote, a rocket slammed into an Iraqi base housing US troops. There were no immediate reports of casualties.