The US House of Representatives has passed resolution aimed at reining in US President Donald Trump’s penchant for a war with Iran.

Despite Trump's vocal opposition to the measure introduced by Virginia Democratic Senator Tim Kaine, lawmakers from both sides of the aisle backed the effort in a vote Wednesday.

The resolution "directs the President to terminate the use of United States Armed Forces for hostilities against the Islamic Republic of Iran or any part of its government or military, unless explicitly authorized by a declaration of war or specific authorization for use of military force against Iran."

Trump has been outspoken in opposing the measure but his disagreement has now been disregarded by a bipartisan group of lawmakers.

"It is very important for our country's security that the United States Senate not vote for the Iran War Powers Resolution," Trump tweeted last month. "If my hands were tied, Iran would have a field day."

The measure will be sent to the White House, which has threatened to veto it.

Kaine introduced the resolution last month after Trump ordered a strike to assassinate Iran’s Major General Qassem Soleimani.

Soleimani played a major role in defending Iran against its enemies and assisting regional countries to fight foreign occupation and terrorism.

The move sparked fears of an all-out war between the Islamic Republic and the United States, triggering the latest effort to curb Trump’s war powers.

Tehran has time and again asserted that it stands ready to defend its interests in the region in the face US aggression.