US President Donald Trump on Wednesday acknowledged that the Iran war was the key factor in his party's sweeping midterm election losses, after Vice President JD Vance urged Republicans to be "honest" about the unpopular conflict's impact.

Asked if he agreed with Vance's remark that the Iran was "the reason we lost," Trump, speaking to reporters at his White House ballroom construction site, said: "I think it's largely true because it drove the gasoline up a little bit short term."

"But at the same time, if I had it to do again, I'd have to do it again. Because long term, it's the only answer. You can't let Iran have a nuclear weapon," he added.